Have anyone every tried a query that has if statement in it?
If so please give me an example.
I have one that looks like:
IF a in (select b from c where d=e)
SELECT f
FROM g
WHERE h=i
ELSE
SELECT j
FROM k
WHERE l=m
then I hae code like this:
$rs_query=mssql_query($sSQL,$conn);
echo $result_rows=mssql_num_rows($rs_query);
It gave me a error on the 2nd line
Warning: mssql_fetch_array(): supplied argument is not a valid MS SQL-result resource
anyone know the reason please help!