Displaying information
Moderator: General Moderators
-
InnerShadow
- Forum Commoner
- Posts: 37
- Joined: Thu Nov 10, 2005 10:44 pm
- Location: US
Displaying information
I was wondering what the exact syntax for selecting information from a database and then displaying that? Any help would be great.
Code: Select all
$result = mysql_query("select * from myTable")
or die(mysql_error());
while($row = mysql_fetch_assoc($result))
{
echo $row['somefieldfromtable'];
}- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
mysql_connect(), mysql_select_db, mysql_query(), mysql_fetch_assoc()
This documentation should get you started
This documentation should get you started