Jump to content


Photo

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


  • Please log in to reply
3 replies to this topic

#1 dpenguin

dpenguin
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 22 August 2006 - 09:52 PM

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.');


This keeps dying. Help?

#2 Corona4456

Corona4456
  • Members
  • PipPipPip
  • Advanced Member
  • 244 posts
  • LocationEl Paso, TX

Posted 22 August 2006 - 09:59 PM

Do:
$result = mysql_query($query, $db_conn) or die(mysql_error());

and post the error message here
What is the CoronaMatrix?

#3 dpenguin

dpenguin
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 22 August 2006 - 10:24 PM

Ooooooh, thank you!! I had the table columns named incorrectly.  ::) Figures it was something simple.

#4 Corona4456

Corona4456
  • Members
  • PipPipPip
  • Advanced Member
  • 244 posts
  • LocationEl Paso, TX

Posted 22 August 2006 - 10:37 PM

Heh... good deal :).
What is the CoronaMatrix?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users