Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in D:\php_localhost\php_quiz\result.php on line 10
2 replies to this topic
#1
Posted 19 December 2010 - 06:48 PM
|
|
|
#2
Posted 20 December 2010 - 12:08 AM
Hi,
You first need to check why your result is not a valid resource. There might be a problem with your query at an earlier line. Are you doing any error handling? Which extension are you using? try calling mysql_error() or mysqli->error to print out the database error that leads to broken result. Kindly post more information about what you are trying to do.
Regards,
Rhossis
You first need to check why your result is not a valid resource. There might be a problem with your query at an earlier line. Are you doing any error handling? Which extension are you using? try calling mysql_error() or mysqli->error to print out the database error that leads to broken result. Kindly post more information about what you are trying to do.
Regards,
Rhossis
#3
Posted 20 December 2010 - 03:32 PM
Yes, a boolean is either True or False, and in this case mysql_query() will return False on error, which points to your SQL query being incorrect.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









