dpenguin Posted August 22, 2006 Share Posted August 22, 2006 code:[code]$db_conn = mysql_connect("localhost", "user", "pw"); mysql_select_db("database", $db_conn); $query = "select * from table " ."where name='$userid' " ." and pass=password('$password')"; $result = mysql_query($query, $db_conn) or die('Sorry, the query is not able to return a result.');[/code]This keeps dying. Help? Link to comment https://forums.phpfreaks.com/topic/18340-help-please-code-included-error-on-mysql-query/ Share on other sites More sharing options...
Corona4456 Posted August 22, 2006 Share Posted August 22, 2006 Do:[code]$result = mysql_query($query, $db_conn) or die(mysql_error());[/code]and post the error message here Link to comment https://forums.phpfreaks.com/topic/18340-help-please-code-included-error-on-mysql-query/#findComment-78837 Share on other sites More sharing options...
dpenguin Posted August 22, 2006 Author Share Posted August 22, 2006 Ooooooh, thank you!! I had the table columns named incorrectly. ::) Figures it was something simple. Link to comment https://forums.phpfreaks.com/topic/18340-help-please-code-included-error-on-mysql-query/#findComment-78859 Share on other sites More sharing options...
Corona4456 Posted August 22, 2006 Share Posted August 22, 2006 Heh... good deal :). Link to comment https://forums.phpfreaks.com/topic/18340-help-please-code-included-error-on-mysql-query/#findComment-78868 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.