Page 1 of 1

mysql_select_db :: Please help

Posted: Sat Sep 04, 2004 11:26 pm
by suz_1234
Hello,

I am very new to the php world and really love to know more... i am trying to connect my html (embedded with php code ) to a mysql database....

This is only for learning purposes... The code connects to the database but it does not return true when i do this ::

$this->db = $db;
if(@mysql_select_db($this->db, $this->conn)) {
return true;
}

can someone please try to guide me thru this??
Thanks much

Posted: Sun Sep 05, 2004 12:41 am
by feyd

Code: Select all

mysql_select_db($this->db, $this->conn) or die(mysql_error());
if you get past that line, you selected correctly.