itsureboy Posted February 23, 2007 Share Posted February 23, 2007 Hi.. I just want to know the code to retrieve data from a MySQL Table. I am having problems retrieving it when i load the page nothing comes up from the table. Thanks in advance..... Link to comment https://forums.phpfreaks.com/topic/39832-php-retrieve-data-from-mysql/ Share on other sites More sharing options...
pocobueno1388 Posted February 23, 2007 Share Posted February 23, 2007 <?php $query = mysql_query("SELECT row1, row2 FROM table_name WHERE condition"); $row = mysql_fetch_assoc($query); echo $row['row1']; ?> Link to comment https://forums.phpfreaks.com/topic/39832-php-retrieve-data-from-mysql/#findComment-192415 Share on other sites More sharing options...
Archadian Posted February 23, 2007 Share Posted February 23, 2007 $query = mysql_query("SELECT col1, col2 FROM table_name WHERE condition"); col being the columns in the table at the top going from left to right Link to comment https://forums.phpfreaks.com/topic/39832-php-retrieve-data-from-mysql/#findComment-192555 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.