sseeley Posted March 2, 2009 Share Posted March 2, 2009 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 More sharing options...
MadTechie Posted March 2, 2009 Share Posted March 2, 2009 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.