JasonHarper Posted May 5, 2011 Share Posted May 5, 2011 Hello, I have some code that has been running just fine on my in-house server. I moved it to an Amazon EC2 instance and now I get the following error: Warning: mysql_result() expects parameter 1 to be resource, boolean given in /var/www/INCLUDES/systemFunctions.php on line 174 Here is the code it's referencing: $result = mysql_query("SELECT count(*) FROM users WHERE userName='$email' AND password='$encryptPassword' AND accountStatus='1' AND accountVerified='1'"); $num = mysql_result($result, 0); I'm at a loss as to why this is happening. Thank you for any help!! Jason Link to comment https://forums.phpfreaks.com/topic/235615-mysql_result-expects-parameter-1-to-be-resource-boolean/ Share on other sites More sharing options...
fugix Posted May 5, 2011 Share Posted May 5, 2011 After your query. If you put. Or die(mysql_error()) what error does it give you? Link to comment https://forums.phpfreaks.com/topic/235615-mysql_result-expects-parameter-1-to-be-resource-boolean/#findComment-1211025 Share on other sites More sharing options...
JasonHarper Posted May 5, 2011 Author Share Posted May 5, 2011 That gave me what I needed! I had a typo in the database name. Thank you so much! Jason Link to comment https://forums.phpfreaks.com/topic/235615-mysql_result-expects-parameter-1-to-be-resource-boolean/#findComment-1211030 Share on other sites More sharing options...
fugix Posted May 5, 2011 Share Posted May 5, 2011 no problem, glad I could help Link to comment https://forums.phpfreaks.com/topic/235615-mysql_result-expects-parameter-1-to-be-resource-boolean/#findComment-1211043 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.