Jump to content

Archived

This topic is now archived and is closed to further replies.

dpenguin

Help please! (code included) - error on mysql query

Recommended Posts

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?

Share this post


Link to post
Share on other sites
Do:
[code]
$result = mysql_query($query, $db_conn) or die(mysql_error());
[/code]

and post the error message here

Share this post


Link to post
Share on other sites
Ooooooh, thank you!! I had the table columns named incorrectly.  ::) Figures it was something simple.

Share this post


Link to post
Share on other sites

×

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.