|
-
May 4th, 2002, 03:48 PM
#1
Thread Starter
Hyperactive Member
Sort by date
In this code:
$Sql = "select * from VisualBasicBank where BankID>=1";
$Result = mysql_query($Sql);
while ($Row = mysql_fetch_array($Result))
{
Echo "$Row[Date]";
}
I want to echo $Row[Date] but sorted by date.
What can i add to $Sql to do that ?
Thanks
-
May 4th, 2002, 04:26 PM
#2
Fanatic Member
change your $Sql statement to:
$Sql = "select * from VisualBasicBank where BankID>=1 order by date asc";
-
May 7th, 2002, 04:50 AM
#3
Thread Starter
Hyperactive Member
Thank you too much
But, please how to sort it by date (New date First)
-
May 7th, 2002, 08:04 AM
#4
cpradio had it right.
use his and place DESC in place of ASC
$Sql = "select * from VisualBasicBank where BankID>=1 order by date DESC";
-
May 7th, 2002, 09:00 AM
#5
Thread Starter
Hyperactive Member
ok
Thank you toooooooooooooooooo much.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|