J'ai les résultats suivants provenant de MySQL.
Array
(
[0] => stdClass Object
(
[id] => 19
[date] => 2010-10-04 11:00:00
[course] => Yoga
[course_id] => 19
[count(*)] => 2
[capacity] => 20
)
[1] => stdClass Object
(
[id] => 20
[date] => 2010-10-04 13:00:00
[course] => Spin
[course_id] => 20
[count(*)] => 1
[capacity] => 24
)
...
...
Je peux obtenir la date, le cours, etc., mais je ne sais pas comment obtenir le nombre (*) avec PHP.
foreach ($bookingnum as $key => $list){
echo "<tr valign='top'>\n";
echo "<td align='center'>".$list->date."</td>\n";
echo "<td align='center'>".$list->course."</td>\n";
// echo "<td align='center'>".$list->count(*)."</td>\n";
// this is wrong. how to get count(*)??
....
...