Possible Duplicate:
PHP: Warning: sort() expects parameter 1 to be array, resource given
I'm getting this error on this line:
mysql_query('SELECT * FROM keys WHERE left > 0');
Possible Duplicate:
PHP: Warning: sort() expects parameter 1 to be array, resource given
I'm getting this error on this line:
mysql_query('SELECT * FROM keys WHERE left > 0');
Both fields keys and left are mysql reserved word so that you have to use backticks like this
mysql_query('SELECT * FROM `keys` WHERE `left` > 0');
Better to write it with the trigger_error and mysql_error. this will produce the actual mysql error if any
mysql_query('SELECT * FROM `keys` WHERE `left` > 0') or trigger_error(mysql_error());