标签: mysql
我正在尝试下面查询条件是否正常
SELECT SUM(quantity) as qty FROM hud_allotment where IF (dvn_cd='$q') and IF(to_dvn='$q');
请告诉我
答案 0 :(得分:0)
如果可以使用where and
where and
SELECT SUM(quantity) as qty FROM hud_allotment where dvn_cd='$q' and to_dvn='$q';