Getting info from MySQL Database
Posted: Wed May 31, 2006 4:49 pm
Hi, I'm trying to pull info from column "name" in my database. I use the following code to try and get it:
When I try to run the query in phpMyAdmin, I get the correct info, but when I call $result2, it returns "Resource id #5" instead of the info from column "name" that I want. How do I get that info?
Code: Select all
$sql2="SELECT name FROM Users WHERE uname='$uname' and pass='$pass'";
$result2=mysql_query($sql2);