mysql查询更新
2018-10-23 本文已影响0人
戒灵
表:icb_whether_image
字段:icb_whether_image
查询表icb_whether_image中字段为icb_whether_image=‘0’更新为icb_whether_image=‘1’
sql ="SELECT * FROM kd_item_collect_box WHERE icb_update_time>CURRENT_TIME() - INTERVAL 12 HOUR AND icb_whether_image='0' "
sql ="UPDATE kd_item_collect_box SET icb_whether_image=‘1’"
如图例子: