error on submission!

0 quadri osho · July 6, 2015
"Warning: mysql_result() expects parameter 1 to be resource, boolean given in C:\wamp\www\personal\contact\resources\func\blog.php on line 35" this is the error i keep getting, i've checked my code in the blog.php file but there seems to be  nothing wrong with it, please i need help i'm on a strict deadline!

Post a Reply


Oldest  Newest  Rating
0 quadri osho · July 15, 2015
thanks a lot, found my error a couple of minutes after i posted this, i do appreciate the assist though!
0 Sachin Kumar · July 8, 2015
The problem is that mysql_query()  is returning false instead of results and which simple means that your query has failed.
Try checking for the spelling mistakes in the query and if it doesn't solve the problems then try echoing out the query and checking it as maybe because of some mistake in your code the query code might be slashing the inverted comma
0 Sheldon Juncker · July 20, 2015
Glad you figured it out! By the way, you probably shouldn't be using any of the mysql_* functions as they've been deprecated for a while now. 

You should look into PHP PDO or PHP MySQLi.
0 Sachin Kumar · July 15, 2015
No prob :D
0 Mahmoud Atwa · July 6, 2015
maybe there is an error in the variable value which you added as the resource ,i can't explain it just look at the example below :
$var = mysql_query("A query is here");
$var_2 = mysql_result($var);

if the function 'mysql_query()' failed due to a type error or something else , it will return 'false' which is a boolean value.
so, the mysql_result() function will fail..
you may have typed something wrong.
just take a good look at the value of the variable that you gave as a resource...
  • 1



Server-side, HTML embedded scripting language used to create dynamic Web pages.