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