I am trying to below query if condition not working
SELECT SUM(quantity) as qty 
FROM hud_allotment 
where IF (dvn_cd='$q') and IF(to_dvn='$q');  
please advise me
I am trying to below query if condition not working
SELECT SUM(quantity) as qty 
FROM hud_allotment 
where IF (dvn_cd='$q') and IF(to_dvn='$q');  
please advise me
You do not need if it could be done with where and
SELECT SUM(quantity) as qty 
FROM hud_allotment 
where dvn_cd='$q' and to_dvn='$q';  
