Re: Populating table rows

From: Date: Tue, 16 Jan 2001 10:03:51 +0000
Subject: Re: Populating table rows
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-34786@lists.php.net to get a copy of this message
Although the syntax is a little odd, let's go with it : while ($result = sqlFetchObject(sqlCurrentTraces)) { $SkyDateAss = $result ->DATEASSIGNED; $SkyDateResult = $result ->DATEAOFRESULT; $SkyAccNo = $result ->ACCNO; print "<br>$SkyAccNo -- $SkyDateAss -- $SkyDateResult \n"; } consider changing variable names $sqlCurrentTraces to $result and $result to something like $row and it may make more sense. or at the very least, be more "standard" also, SkyDateAss struck me as funny. Philip On Tue, 16 Jan 2001, Wade Halsey wrote: > Hi > > Ive selected some details from a database and now want to loop through the result and populate > a row in a table each time. > > > $sqlCurrentTraces = sqlExecute( "Select * from Sky where No = '$Name'" ); > $result = sqlFetchObject( $sqlCurrentTraces ); > > $SkyDateAss = $result ->DATEASSIGNED; > $SkyDateResult = $result ->DATEAOFRESULT; > $SkyAccNo = $result ->ACCNO; > > I want to do the stuff below: > <tr><td> <? echo $SkyAccNo ?></td><td> <? echo $SkyDateAss > ?></td><td> <? echo $SkyDateResult ?></td><td><input > type="submit" name="UpdateDiary" value ="Update > Diary"></td></tr> > > The sql qorks and the table is populated once. > > Help someone? > > Thanks > Wade > WHalsey@rph.co.za > >

« previous php.general (#34786) next »