On Wednesday, July 3, 2002, at 10:43  AM, Duncan Ellwood wrote:

> My problem arises when I want to fill in the subsequent rows of the 
> table
> with the subesquent rows from the database. How do I create the 
> recordset
> that will pull the info from the relevant subsequent rows for my 
> columns?
> The code for the first row and first column entry is:
> <?php echo $row_RsSingStanDailybb['DailyBB']; ?>
> but in the row below in the html table I want to refer to the second 
> row DB
> entry for DailyBB but I cant see how to go about this:( The Repeat 
> server
> behaviour in DW Mx simply puts all the values in one html cell which is 
> not
> what I wish to achieve. Basically I want the html table to match the
> database but have only succeeded in getting the first row to display so
> far:(

I haven't used DW Mx myself, I don't really like WYSIWYGs.  But the way 
to do it is use a while loop.

// $db = your connection parameters
// $sql = your query
if (!$result = mysql_query($sql, $db)) {
        die('The query failed for some reason');

// this part goes through all the data in $result
// and does something with that data on each iteration
while ($row = mysql_fetch_assoc($result)) {
        echo $row_RsSingStanDailybb['DailyBB'];



Erik Price
Web Developer Temp
Media Lab, H.H. Brown

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to