0

Zend DB テーブルでこれを行うには? お気に入り、

UPDATE location AS main
  SET main.parent_location = 28, 
  main.description = CONCAT(
          (SELECT sub.description FROM wms_location AS sub WHERE sub.id_location=28), 
           main.designation
      ) 
WHERE main.id_location in (11, 14);

これは可能ですか?

4

1 に答える 1

1
$table->update(
    "parent_location" => new Zend_Db_Expr(
        "CONCAT(" . (string)$subSelect . ", designation)"
    ),
    "id_location IN(11, 14)"
);

I'm not sure about the aliases - whether they're possible and whether they're needed.

于 2012-07-13T09:38:24.083 に答える