Query not running right in php script!

A

Anonymous

Guest
Hi,

Try and echo the sql after the error and see what you get.

Regards.
 
mysql_fetch_array(mysql_query($sql,$conn));
this part doesnt work all the time as it should.. devide it into to parts: query and then fetch_assoc (not array as it's useless, assoc is recommended.)
 
You are trying to run several SQL queries in one mysql_query() function. This cannot be done using PHP (for security reasons) and therefore you must split your queries and use PHP to cover for the loss of functionality.
 
another thing would be using union for running simmilar queries... but in your case you will need to have to separate queries..
 
Back
Top