Jump to content

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


Drominus

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.

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.

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.