Support Forums / Support forum / Archives / 03-28-2004 / MySQL help

Topic: MySQL help
March 3rd, 2004 05:55 PM
sdn Does anyone know why this code doesn't work?

code:

mysql_select_db("test_db");

$query = "select * from test_db where
user = '$id' and
password = '$pw'";
$result = mysql_query($query);



I can log in to MySQL and choose my database, but $result returns false. What's wrong with the query?

Edit: Never mind, it was just a noobish mistake. I was trying to select a database from a database.
[Edited by sdn]
March 6th, 2004 12:27 AM
Exdeus sdn...if you didnt get it solved...try posting in Computing.Net. I post there for everything computer related and they are great with helping out with things. Give them a shot if you havent figured out your problem yet.

GL
March 6th, 2004 02:58 PM
sdn No, I fixed it. My other mistake was suppressing errors so I didn't know why it wasn't working.