草庐IT

SalesRule

全部标签

mysql - 两个表的sql命令怎么写?

table**salesrule_coupon**:filedsasthefollowing:coupon_idcode1Registered_send_52test表:salesrule_coupon_usage归档如下:coupon_idcustomer_idtimes_used1111...14...1..现在,我想选择times_usedwherethecode=Registered_send_5wherecustomer_id=$id。sql命令怎么写?谢谢你。以下是我的,但它不起作用。$sql="SELECTtimes_usedFORMsalesrule_coupon_us