RE: [PHP-DB] format problems on postgresql query?

From: Date: Fri, 15 Dec 2000 01:06:07 +0000
Subject: RE: [PHP-DB] format problems on postgresql query?
References: 1  Groups: php.db php.general 
Request: Send a blank email to php-db+get-5266@lists.php.net to get a copy of this message
missing the first <tr> that you are closing at the end of the loop but more importantly, take the <br> out of your loop - that is your problem Dave -----Original Message----- From: mark.christenson@alumni.stanford.org [mailto:mark.christenson@alumni.stanford.org] Sent: Thursday, December 14, 2000 7:54 PM To: php-general@lists.php.net; php-db@lists.php.net Subject: [PHP-DB] format problems on postgresql query? I'm getting some behavior that I can't figure out. I make a query, then display it in a table using the code below. I end up with half the resulting page as space, before the actual results start to show up. If I limit the result to one row, there's one row of space then the result row. If I limit the result to 2 rows, then I get two rows of space and then two result rows. And so on. If a put an echo "text"; line in the for {} block then it gets repeated as many times as rows are returned, but prior to any of the result rows from the database being returned. If anybody doesn't understand what I'm describing, you can view the page at http://www.markchristenson.com/phphelp.php TIA, Mark for ($k=0; $k<$numrows4; $k++) { $arr = pg_fetch_array($result4, $k); $resultbottlecount2 = pg_Exec($dbconn, "select countonewine($arr[wineid])"); $arrbottlecount2 = pg_fetch_array($resultbottlecount2, 0); echo "<TD>" . $arrbottlecount2[0] . "</TD>"; $arr = pg_fetch_array($result4, $k); echo "<TD>" . $arr["wineid"] . "</TD>"; $arr = pg_fetch_array ($result4, $k); echo "<TD>" . $arr["vintage"] . "</TD>"; $arr = pg_fetch_array ($result4, $k); echo "<TD>" . $arr["label"] . "</TD>"; $arr = pg_fetch_array ($result4, $k); echo "<TD>" . $arr["appellation"] . "</TD>"; $arr = pg_fetch_array ($result4, $k); echo "<TD>" . $arr["varietal"] . "</TD>"; echo "</TR>"; echo "<BR>"; } ---------------------------------------------- E-mail@stanfordalumni.org is brought to you by the Stanford Alumni Association and Critical Path. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.db (#5266) next »