Jump to content

MYSQL Error


sseeley

Recommended Posts

I am looking for some help, and I would be really grateful if anyone can help me out...

 

The code I am using is...

 

$get=mysql_query("SELECT count(*) FROM tbluser WHERE `username` = '$userName' AND `password` = '$protectedPass' AND `deleted` = '0' ");

$result = mysql_result($get,0);

echo $result;

 

But I keep getting the following error? 

 

Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /home/mypcguy2/public_html/accounts/loginConfirm.php on line 12

 

It's only happening on my live server and not my local test server?  Can anyone help me...many thanks in advance.

 

Stuart

Link to comment
https://forums.phpfreaks.com/topic/147631-mysql-error/
Share on other sites

i would guess that the query is wrong, (field missing maybe)

for a better error report try

 

$get=mysql_query("SELECT count(*) FROM tbluser WHERE `username` = '$userName' AND `password` = '$protectedPass' AND `deleted` = '0' ") or die(mysql_error());
$result = mysql_result($get,0);
echo $result;

Link to comment
https://forums.phpfreaks.com/topic/147631-mysql-error/#findComment-775001
Share on other sites

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.