bob2006 Posted April 16, 2007 Share Posted April 16, 2007 hey all, im trying to find a php code that will pull info from the database i know that i have to fetch the onfo form the database but i dont know how the write the code can some one please help thanxs Link to comment https://forums.phpfreaks.com/topic/47287-pulling-info-form-mysql-database/ Share on other sites More sharing options...
pocobueno1388 Posted April 16, 2007 Share Posted April 16, 2007 <?php //select the info from the DB $sql = mysql_query("SELECT col1, col2 FROM tbl_name WHERE condition"); //fetch the results from the query $row = mysql_fetch_assoc($sql); //now display the info from the DB echo $row['col1']; ?> Link to comment https://forums.phpfreaks.com/topic/47287-pulling-info-form-mysql-database/#findComment-230647 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.