码迷,mamicode.com
首页 > 其他好文 > 详细

update

时间:2015-07-23 19:36:36      阅读:100      评论:0      收藏:0      [点我收藏+]

标签:

SELECT
 CONCAT(
‘UPDATE free_for_demo_orders  SET product_id=‘,
product_id,
‘,order_created_time=‘,
‘"‘,
TIMESTAMPADD(HOUR, 8, sales_order.created_at),
‘" WHERE order_id=‘,
entity_id,
‘;‘
),
 `entity_id`,
 
  customer_id,
  `customer_email`,
  quote_id,
  sales_order.store_id,
  product_id,
  TIMESTAMPADD(HOUR, 8, sales_order.created_at),
  TIMESTAMPADD(HOUR, 8, sales_order.created_at)
FROM
  `sales_flat_order` AS sales_order
LEFT JOIN  `sales_flat_order_item` ON  entity_id=order_id
WHERE  STATUS <> ‘canceled‘ AND grand_total=10 AND price  = 0

update

标签:

原文地址:http://www.cnblogs.com/fengliang/p/4671386.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!