Returning Values from MYSQL QUERIES

admin

Administrator
Staff member
Guys,

I hope someone can help me out there.
Is there any references for returning values from mysql queries through php commands.

For example :

if(!mysql_connect($Hostname)) {
exit();
} else {
mysql_select_db($Databasename);
$query = "select username from
clinician where username
= '$Create_username';";
$result = mysql_query($query);
}

if the query was successful what would be stored in the $result variable. whenever I run this script and echo to the screen I get the following : RESULT = Resource id #2
regardless if the result is true or not.

Many Thanks

Fuzz
 
Back
Top