Re: [PHP] always last

2001-08-24 Thread Chris Hayes
Van:"Andrey Hristov" <[EMAIL PROTECTED]> Aan:<[EMAIL PROTECTED]> Datum verz. Thu, 23 Aug 2001 18:33:53 +0300 Onderwerp: Re: [PHP] always last > Use a counter when fetching from the DB > if you use whi

Re: [PHP] always last

2001-08-24 Thread Chris Hayes
Hi Jeremy, it's always easier for us if you tab/organize the code a bit so we get the overview. like this: $result = @mysql_query($sql,$connection) or die("Couldn't execute query."); while ($row = mysql_fetch_array($result)) { $uid = $row['uid'] $team = $row['team'];

Re: [PHP] always last

2001-08-23 Thread Dave Freeman
On 23 Aug 01, at 11:10, Jeremy Morano wrote: > $result = @mysql_query($sql,$connection) or die("Couldn't execute query."); > > > while ($row = mysql_fetch_array($result)) { > $uid = $row['uid'] > $team = $row['team']; if ($uid == $row['uid']) { $option_block .= "$team"; } else { >

Re: [PHP] always last

2001-08-23 Thread Andrey Hristov
Use a counter when fetching from the DB if you use while the $counter=0; while(list(...)=mysql_fetch_array($res)){ $option_block .= ''.$option.''; } Andrey Hristov IcyGEN Corporation http://www.icygen.com 99% - Original Message - From: "Jeremy Morano" <[EMAIL PROTECTED]> To: <[EMAIL