nathanmaxsonadil Posted July 29, 2007 Share Posted July 29, 2007 I was wondering how to display a column from a mysql table? Link to comment https://forums.phpfreaks.com/topic/62304-solved-phpmysql-question/ 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 />"; } } } ?> Link to comment https://forums.phpfreaks.com/topic/62304-solved-phpmysql-question/#findComment-310039 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.