birdie Posted April 8, 2006 Share Posted April 8, 2006 [code] $sql = "SELECT * FROM matches ORDER BY sched ASC";$query = mysql_query($sql);while($row = mysql_fetch_array($query)){$clan1 = $row['clan1'];$clan2 = $row['clan2'];echo $clan1." vs ".$clan2."<br>";}[/code]that is my script.. this is my table[code]id|sched|sched_by|clan1|clan2|matchtype[/code]sched is where my timestamps are added but i have 1 problem.. when i try and use an order by statement, it doesnt work. any help is greatly appreciated! :-)ps. yeah barand, thanks for the help i just need my news to be in order thats all :-) Quote Link to comment Share on other sites More sharing options...
Barand Posted April 8, 2006 Share Posted April 8, 2006 What do you get if you run this[code]$sql = "SELECT sched FROM matches ORDER BY sched ASC LIMIT 20";$query = mysql_query($sql);while($row = mysql_fetch_array($query)){ echo $row['sched']."<br>";}[/code] Quote Link to comment Share on other sites More sharing options...
birdie Posted April 8, 2006 Author Share Posted April 8, 2006 ok.. it echo's all of my timestamps in order.. tryed it like this next[code]$sql = "SELECT * FROM matches ORDER BY sched ASC LIMIT 20";$query = mysql_query($sql);while($row = mysql_fetch_array($query)){$clan1 = $row['clan1'];$clan2 = $row['clan2'];echo $clan1."<br>";}[/code]guess what, it didnt work.. hmm thanks thoughedit:weird, now it doesnt work at all [a href=\"http://antrino.no-ip.info/beta/websites/UBF/devops/matches3.php\" target=\"_blank\"]http://antrino.no-ip.info/beta/websites/UB...ps/matches3.php[/a] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.