Error explanation?

wxdqz

New Member
Getting this error (line 17 is the while loop):

Warning: Supplied argument is not a valid MySQL result resource in /var/www/html/test.php on line 17

from this code:

$date = date('Y\-m\-d');

mysql_connect('localhost', '$user', '$pass');
mysql_select_db(classeval);
$result = mysql_query("SELECT * FROM class where class_start <= $date and where class_end >= $date");

while ($row = mysql_fetch_array($result)){
echo "$row[class_id]<br>";
}
 
Back
Top