我想在下面显示这张表
September 2013
- 14/09/2013 | 14:30 | Football | League | Paris - Berlin
- 14/09/2013 | 19:30 | Volley | Cup | Paris - Barcelona
- 25/09/2013 | 12:00 | Football | Amical | Paris - Bordeaux
October 2013
- 5/10/2013 | 15: 00 | Cup | Paris - Londres
这是我的代码
$dateQuery = mysql_query("SELECT matches.id, date_debut, date_fin, matches.score,sports.title AS 运动, clubs1.title AS recevant, clubs2.title AS 访客, Competitions.title AS 比赛,matches.description, sexes.title作为性 FROM 匹配项 在 sexes.id =matches.sexe_id 上的 INNER JOIN 性别 在 sports.id = matches.sport_id 上的内部加入运动 INNER JOIN clubs AS clubs1 ON clubs1.id = matches.recevant_id INNER JOIN clubs AS clubs2 ON clubs2.id = matches.visiteur_id INNER JOIN 比赛 ON Competitions.id = matches.competition_id WHERE CURRENT_DATE()<=date_debut ORDER BY date_debut ASC") 或 die(mysql_error());while($row=mysql_fetch_assoc($dateQuery)){ print '<b>'.$tIndexed[$row['date_debut'] ][ $row['sport'] ][]=date("d-m-Y",strtotime($row['date_debut'])).'</b><br />'; foreach($tIndexed as $sDate => $tIndexedDate){ foreach($tIndexedDate as $sEvenement => $tIndexedEvenement){ foreach($tIndexedEvenement as $sTexte){ $sTexte = $row['recevant'].'-'.$row['visiteur']; print date("H:i",strtotime($row['date_debut'])).' | ' .$row['sport'].' | '.$row['competition'].' | '.$sTexte.' <br />'; } } } }
结果显示错误
14-09-2013 14:30 | Football | Championnat de France | IOS ORLEANS-CSSM PARIS 14-09-2013 19:30 | Football | Championnat de France | CSSM PARIS-ASLS NANCY 19:30 | Football | Championnat de France | CSSM PARIS-ASLS NANCY 21-09-2013 15:00 | Football | Championnat de France | CSS RENNES-CSSM PARIS 15:00 | Football | Championnat de France | CSS RENNES-CSSM PARIS 15:00 | Football | Championnat de France | CSS RENNES-CSSM PARIS 28-09-2013 19:30 | Football | Championnat de France | CSSM PARIS-CSS RENNES 19:30 | Football | Championnat de France | CSSM PARIS-CSS RENNES 19:30 | Football | Championnat de France | CSSM PARIS-CSS RENNES 19:30 | Football | Championnat de France | CSSM PARIS-CSS RENNES
我希望你能帮助我解决这个问题。
谢谢