hi hth Peter <?php //connect to mysql $mysql_link = mysql_connect("localhost", "mysql_user", "mysql_password") or die("Could not connect: " . mysql_error()); //get all columns for the selected rows $query = 'SELECT * FROM table_name WHERE Column_name = "some_value"'; //execute query $mysql_result = mysql_query($query, $mysql_link); $retval.='<table width="95%">'; while($row = mysql_fetch_array($mysql_result)) {// enter display code here $retval.=' <tr> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td>'.$row["Column_name1"].' </td> <td>'.$row["Column_name2"].' </td> <td>'.$row["Column_name3"].' </td> <td>'.$row["Column_name4"].' </td> </tr> <tr> <td> </td> <td> </td> <td> </td> <td> </td> </tr>'; }// end while $retval.='</table>'; //output results print $retval ; //close mysql link mysql_close($link); ?> -----Original Message----- From: Mike Delorme [mailto:crazymonkey1385@hotmail.com] Sent: 23 March 2003 21:11 To: MySQL PHP Database Help Subject: DB CODEING HELP!!!!! this is bugging me. I have tried everything and I cant develop the code without an error. Can someone plese write me simple code that will go through a table and print 3 collums of that table? I cant figure it out -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php