RE: [PHP-DB] DB Print Columns and Rows

From: Date: Thu, 24 Oct 2002 14:59:58 +0000
Subject: RE: [PHP-DB] DB Print Columns and Rows
Groups: php.db 
Request: Send a blank email to php-db+get-22664@lists.php.net to get a copy of this message
Sorry, fixed a syntax error in my original post. > -----Original Message----- > From: Hutchins, Richard [mailto:Richard.Hutchins@GetingeCastle.com] > Sent: Thursday, October 24, 2002 10:59 AM > To: 'Tony72284@aol.com'; php-db@lists.php.net > Subject: RE: [PHP-DB] DB Print Columns and Rows > > > Something like this should also work for you. > > <table> > > <?php > while($row=mysql_fetch_array($sqlResult){ > $var1=$row["col1"]; > $var2=$row["col2"]; //etc., etc. > > > echo("<tr><td>".$var1."</td><td>".$var2."</td></tr>");//this > line corrected > } > ?> > </table> > > > -----Original Message----- > > From: Tony72284@aol.com [mailto:Tony72284@aol.com] > > Sent: Thursday, October 24, 2002 10:55 AM > > To: php-db@lists.php.net > > Subject: [PHP-DB] DB Print Columns and Rows > > > > > > > > Hello PHP people. I was wondering if I could get a > > question answered? > > > > How would I print a Database Table into a <table> when > > the DB Table > > has 4 columns, AND 4 rows. > > > > See I only know how to print one column. > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.db (#22664) next »