$sql = 'SELECT c.is_check' .
' FROM ' . $GLOBALS['ecs']->table('goods') . ' AS g ' .
' LEFT JOIN ' . $GLOBALS['ecs']->table('cart') . ' AS c ON c.goods_id = g.goods_id ' .
' WHERE g.enter_mode = 3105 AND c.user_id = $user_id';
如上 sql 语句是通过 cart
表和 goods
表的一些条件查询出 cart
表中符合条件的 is_check
字段。
我现在想将这个字段里的值统一更新为我前台传过来的 $is_chick
,该怎么实现尼?
或者说能不能直接用 updata
语句实现尼?
类似这样,sql语句你自己需要调试