I use something like this:
$host="localhost";
$root="root";
$pass="password";
mysql_connect($host,$root,$pass);
mysql_select_db("test");
if(!mysql_connect("localhost","root","password")){
echo "You fail.";
}
else {
echo "success<br/>";
}
$DaBook = mysql_query("SELECT title FROM books WHERE ID=1");
echo $DaBook;
It doesn't give me the content of cell, but some strange string:
"Resource id #2"
What am I doing wrong? The result should be returned as a string, since the content of cell is String type.
When I do this inside the database the result is given as expected, but when I use mysql_query(...) it returns some bull****.
Thank you, A.J.