Prestashop:update ps_orders.valid MYSQL -
i'm trying update valid value inside ps_orders table 0 1 inside cycle, doesen't change @ all, here code:
//this first query:
$query = "select ps_orders.reference,ps_orders.id_order,ps_orders.valid,ps_order_detail.product_name,ps_orders.id_order,ps_orders.date_add,ps_orders.payment,ps_order_detail.unit_price_tax_incl,ps_order_detail.id_order_detail,ps_order_detail.product_quantity,ps_order_detail.product_reference,ps_order_detail.product_weight,ps_order_detail.unit_price_tax_incl,ps_address.id_customer,ps_address.firstname,ps_address.lastname,ps_address.address1,ps_address.address2,ps_address.postcode,ps_address.city ps_orders join ps_order_detail on ps_orders.id_order = ps_order_detail.id_order join ps_address on ps_orders.id_customer = ps_address.id_customer ps_orders.id_order=$i , ps_orders.valid=1";
//and how wanna change value
$uporder = mysql_query("update ps_orders set valid=0 id=".$row[id_order]);
there's no column named id
in ps_orders
table, instead use id_order
column , modify query like
"update ps_orders set valid=0 id_order=".$row[id_order
Comments
Post a Comment