I've been hitting the same problem over and over in my development. Sometimes when i do a MySQL query I keep getting the error
Warning: mysql_fetch_row() expects parameter 1 to be resource.
I don't understand why. What does this error mean, am I doing something wrong? I've googled it but I just get pages with the same error...
I'm using php 5.3, it's definitely not my mysql statement. I'm lost >.<
I even simplify my query code and still the same problem. The general code look something like this:
require "dbconn.php"; $id=$_POST['id']; $checkquery = "SELECT * FROM table WHERE id = '$id'"; $checkresults = mysql_query($checkquery); $row = mysql_fetch_row ($checkresults);
It crashes on the last line :S