Please i am trying to use an if condition with the following select statement and at the ened trying to concatenate all the three variables to one under $strSQL
Can you please, if you don't mind correct my if condition I am new to PHP.
$strSQL1 = "Select distinct id, login, gender,date_birthday, icon_path
from ".USERS_TABLE."
where status='1' and root_user = '0'
if $areacode!=null then
$strSQL2 = " and areacode like '%".$areacode."%'
else
$strSQL2 = null
end if
$strSQL3 = "order by a.id".$limit_str"
$strSQL = $strSQL1 . $strSQL2 . $strSQL3;
Thank you very much for the help.