MichaelLewis
Apr 3rd 2008, 4:44 pm
I have a database with a table called "testtbl" and a field called "UserID".
I have entered data in this table (54 rows) but I can't extract and print the data. I don't get any error messages either.
Can you tell me what's wrong with my code?
mysql_connect(localhost,$username);
mysql_select_db($database) or die ("Unable to select the database.");
$query = "SELECT UserID FROM testtbl";
$Results = mysql_db_query($database,$query);
mysql_close();
print("$Results<br>");
Thanks,
Michael
I have entered data in this table (54 rows) but I can't extract and print the data. I don't get any error messages either.
Can you tell me what's wrong with my code?
mysql_connect(localhost,$username);
mysql_select_db($database) or die ("Unable to select the database.");
$query = "SELECT UserID FROM testtbl";
$Results = mysql_db_query($database,$query);
mysql_close();
print("$Results<br>");
Thanks,
Michael