Reinhart Viane wrote:
Hey list
I have a mysql table like this:
[ snipped ]
Now I retrieve all activities happening in the future with this query:
$sqlact="select * from activities where act_date >= NOW() order by
act_type_id”;
$getact=mysql_query($sqlact)
What I’m trying to do now is:
From the result array, pick from every different act_type_id the two
activities that will happen first and put them in 2 variables
while($row = mysql_fetch_assoc($getact))
{
$results[$row['act_type_id']][] = $row;
}
echo "<pre>"; print_r($results); echo "</pre>";
Please send only plain text messages to the list, and avoid attachments.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php