Re: [PHP] Need to refine this:

2004-02-03 Thread John Taylor-Johnston
> [1] http://us2.php.net/manual/en/control-structures.do.while.php > Thanks! Didn't see that page. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Need to refine this:

2004-02-03 Thread Adam Bregenzer
On Wed, 2004-02-04 at 00:32, John Taylor-Johnston wrote: > I cannot declare $temp = $mydata->district; outside while ($mydata so ... ? > I'm missing something in my logic. That's why I asked. > It wouldn't make sense to declare this twice: > while ($mydata = mysql_fetch_object($myquery)) You could

Re: [PHP] Need to refine this:

2004-02-03 Thread Douglas Douglas
Just my two cents :) $temp = ""; echo "\n"; while ($mydata = mysql_fetch_object($myquery)) { if ($temp != $mydata->district) { $temp = $mydata->district; echo "$mydata->district\n"; } echo "$mydata->city $mydata->place $mydata->meetingtime\n"; } echo "\n"

Re: [PHP] Need to refine this:

2004-02-03 Thread John Taylor-Johnston
Jason, > You're tired so you want others to do your work? No ... > Maintain a 'flag' which stores 'previous' value of $mydata-district. If 'flag' > and $mydata-district differ print $mydata-district and update 'flag'. I cannot declare $temp = $mydata->district; outside while ($mydata so ... ? I

Re: [PHP] Need to refine this:

2004-02-03 Thread Jason Wong
On Wednesday 04 February 2004 12:56, John Taylor-Johnston wrote: Please use a meaningful subject. > I need to refine this. I'm tired ... long day. You're tired so you want others to do your work? > I would like to echo $mydata->district only once unless it changes. Maintain a 'flag' which stor