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'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))


$temp = "";
echo "<table>\n";
 while ($mydata = mysql_fetch_object($myquery))
      {
$temp = $mydata->district;
while ($temp <> $mydata->region)
{
 echo "<tr bgcolor=\"#CCCCCC\"><td>$mydata->district</td></tr>\n";
}
 echo "<tr bgcolor=\"#CCCCCC\"><td>$mydata->city</td>
<td>$mydata->place</td>
<td>$mydata->meetingtime</td></tr>\n";
      }
echo "</table>\n";

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

Reply via email to