Jump to content

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result..


Recommended Posts

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource on line 14.

 

<?PHP

require_once("dbcheck.php");

require_once("check.php");

$Username=$_COOKIE['Username'];

$Password=$_COOKIE['Password'];

$Nickname=$_COOKIE['Nickname'];

$Username=mysql_real_escape_string($Username);

$Password=mysql_real_escape_string($Password);

 

date_default_timezone_set('Asia/Calcutta');

 

$action = $_GET['do'];

$Result=mysql_query("SELECT * FROM Checks WHERE UserName='$Username'");

$Rowexist=mysql_num_rows($Result);

if($Rowexist!=0){

while($Rows=mysql_fetch_array($Result))

{

$Serial = $Rows['Serial'];

$Banned = $Rows['Banned'];

$IP = $Rows['IP'];

$Used = $Rows['Used'];

$First = $Rows['First'];

$Duration = $Rows['Duration'];

$Total = $Rows['Total'];

$Time = $Rows['Time'];

}

if($action=="" || $action=="Banlist"){

mysql_query("UPDATE Checks SET NickName='$Nickname' WHERE UserName='$Username'");

?>

Your query is failing. mysql_error should help you figure out why. It would also be helpful to echo the query string to make sure it contains the values you'd expect it to contain.

Table '******_forum.Checks' doesn't exist

Thats pretty much self explanatory. The table Checks doesn't exist. Have you checked the database and made sure it does exist? Actually, have you connected to the database?

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/elitehax/public_html/GuidTech/members.php on line 17

 

 

*I added the Checks table.

 

Because it would not be $Result, it would be $queryresult.

 

 

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.