如何在Zend DB Table上执行此操作?像,
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);
这甚至可能吗?
答案 0 :(得分:1)
$table->update(
"parent_location" => new Zend_Db_Expr(
"CONCAT(" . (string)$subSelect . ", designation)"
),
"id_location IN(11, 14)"
);
我不确定别名 - 它们是否可能以及是否需要它们。