Log in

View Full Version : MySQL Query Empty on default install? (i.e. No edits.)


Flametail
10-17-2011, 02:13 PM
Query was empty.

KK, I was running into this wall of errors...

Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\inc\functions.php on line 1623

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\inc\functions.php on line 61

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\inc\functions.php on line 66

Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\inc\functions.php on line 1645

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\inc\functions.php on line 424

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\inc\functions.php on line 560

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\inc\functions.php on line 564

Warning: file_get_contents(templates//template.html) [function.file-get-contents]: failed to open stream: No such file or directory in C:\xampp\htdocs\inc\functions.php on line 1691

So I tried an old php trick I know....

$resultjjj = mysql_query($result) or die($result."<br/><br/>".mysql_error());

And it said the mysql error was that the query was empty......

Help?

Flametail
10-17-2011, 11:49 PM
I have found out that this issue is cause by the $GLOBALS not working....they seem to all be blank...

Flametail
10-18-2011, 11:57 AM
Issue fixed by copy the variables out of config.php and puting them in functions.php.

Nemesis
10-18-2011, 12:30 PM
thats good cause i couldn't help via skype :S