Handling Query Response

From: Date: Wed, 02 Aug 2000 20:07:30 +0000
Subject: Handling Query Response
Groups: php.general 
Request: Send a blank email to php-general+get-9811@lists.php.net to get a copy of this message
This is driving me nuts... Review the following code: # Issue query here #### print("<TABLE>\n"); while ($row = mysql_fetch_row ($result)) { print ("<TR\n"); for ($i = 0; $i < mysql_num_fields ($result); $i++) { printf ("<TD>%s</TD>\n", htmlspecialchars ($row[$i)); } print ("</TR>\n"); } Okay, I get a nice table that shows the results of a two-field query, one item next to another down the table. Well this table goes down for quite aways and I'd like to make a second or third column in my table to accommodate this. No matter what I try, it just does not work. I knoiw what the HTML should look like, but am having trouble making my script accomplish this. Any solutions? Thanks! Daniel E. Lautenschleger University of Wisconsin R.M. Bock Laboratories Network Administrator and Computer Support dan@www.molbio.wisc.edu 608.262.3403

« previous php.general (#9811) next »