nathanmaxsonadil Posted July 29, 2007 Share Posted July 29, 2007 I was wondering how to display a column from a mysql table? Quote Link to comment Share on other sites More sharing options...
trq Posted July 29, 2007 Share Posted July 29, 2007 A simple example.... <?php $sql = "SELECT columnname FROM tablename"; if ($result = mysql_query($sql)) { if (mysql_num_rows($result)) { while ($row = mysql_fetch_assoc($result)) { echo $row['columnname'] . "<br />"; } } } ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.