UPDATE p.id_product, p.quantity, p.price,p.on_sale, p.additional_shipping_cost, p.active,
p.available_for_order, p.show_price, p.date_upd,
pl.id_product, pl.name,pl.description, pl.description_short,
cl.id_category, cl.name,
ps.is_product,ps.price
LEFT JOIN ps_product_lang pl ON (p.id_product = pl.id_product)
LEFT JOIN ps_category_lang cl ON (p.id_category_default = cl.id_category)
LEFT JOIN ps_product_shop ps ON (p.id_category_default = ps.id_product)
SET
p.quantity = \"$quantity\",
p.price = \"$price\",
p.additional_shipping_cost = \"$additional_shipping_cost\",
p.active = \"$active\",
p.available_for_order = \"$available_for_order\",
p.show_price = \"$show_price\",
pl.name=\"$name\",
pl.description=\"$description\",
pl.description_short=\"$description_short\",
p.date_upd = NOW(),
cs.price=\"$price\",
cs.date_upd = NOW()
WHERE p.id_product = $i
質問する
101 次
1 に答える
0
update ステートメントの正しい構文は次のとおりです。
update FooTable
set fooField1 = fooValue
where foofield2 = fooCondition
したがって、クエリは、フィールドを選択せずに、次のようにする必要があります...
UPDATE FooTable p
LEFT JOIN ps_product_lang pl ON (p.id_product = pl.id_product)
LEFT JOIN ps_category_lang cl ON (p.id_category_default = cl.id_category)
LEFT JOIN ps_product_shop ps ON (p.id_category_default = ps.id_product)
SET
p.quantity = \"$quantity\",
p.price = \"$price\",
p.additional_shipping_cost = \"$additional_shipping_cost\",
p.active = \"$active\",
p.available_for_order = \"$available_for_order\",
p.show_price = \"$show_price\",
pl.name=\"$name\",
pl.description=\"$description\",
pl.description_short=\"$description_short\",
p.date_upd = NOW(),
cs.price=\"$price\",
cs.date_upd = NOW()
WHERE p.id_product = $i
于 2013-07-02T12:09:32.610 に答える