$result = true or false??
| From: | Kevin Connolly | Date: | Fri, 26 Jan 2001 17:37:10 +0000 |
| Subject: | $result = true or false?? | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-6210@lists.php.net to get a copy of this message | ||
Hi,
$db = mysql_connect("localhost", "root");
mysql_select_db("mydb",$db);
$sql = "SELECT * FROM employees where first = '$login'";
$result = mysql_db_query ("mydb", $sql);
echo "$result";
If I run this cose then $result always = Resource id #2 even if $login is not a member of the
database.
Is there anyway I can get it to output true if $login is a member and false if $login is not a
member? or at least get $result to be different if $login is in the database to that when it is not?
Thanks,
Kevin.