Jump to content

Recommended Posts

i am getting the following error on page: http://cop-help.com/Testing/Redupdate.php

Warning: mysql_numrows() expects parameter 1 to be resource, boolean given in /customers/cop-help.com/cop-help.com/httpd.www/Testing/Redupdate.php  on line 10

 

$query= "SELECT * FROM Runesred WHERE id='$id'";
$result=mysql_query($query);
$num=mysql_numrows($result);

 

Line 10 is the the code above i am not sure why this is happening can anyone explain to me why this is happening :S

 

Link to comment
https://forums.phpfreaks.com/topic/198027-id/
Share on other sites

Change this and see what error comes up:

 

$result=mysql_query($query) or trigger_error("Query Failed: " . mysql_error());

 

 

Notice: Query Failed: No database selected in /customers/cop-help.com/cop-help.com/httpd.www/Testing/Redupdate.php on line 9

 

But i have connected and have tested the database connection to it

Link to comment
https://forums.phpfreaks.com/topic/198027-id/#findComment-1039085
Share on other sites

Somewhere you are either calling mysql_close or you are not calling mysql_select_db

 

It is hard to say which without more code, but I am sure you can look through and make sure that the select_db is being ran and that there are no premature calls to mysql_close

Link to comment
https://forums.phpfreaks.com/topic/198027-id/#findComment-1039087
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.