[PHP-DB] 'Order by' question

2005-02-09 Thread Justin.Baiocchi
Hi, I have a MySQL varchar column which I wish to display. Most of the entries are numbers eg 1, 2, 3 etc etc. But some are numbers and letters eg 34A, 34B, 35A. When I display the column I am able to sort by number using the order by column_name+0 command, as in: $result = mysql_query(SELECT

Re: [PHP-DB] 'Order by' question

2005-02-09 Thread John Holmes
[EMAIL PROTECTED] wrote: Hi, I have a MySQL varchar column which I wish to display. Most of the entries are numbers eg 1, 2, 3 etc etc. But some are numbers and letters eg 34A, 34B, 35A. When I display the column I am able to sort by number using the order by column_name+0 command, as in: $result

[PHP-DB] order by question

2001-09-11 Thread Andrius Jakutis
Ok, here is the question: I write to order by date Order by date. So, it output's something like this: 2001 08 01 2001 08 02 2001 08 03 What if I want to order by date, but not from the older to newest, but from newest to older ? The same is with numbers - priority I use order by priority.

Re: [PHP-DB] order by question

2001-09-11 Thread Jason Wong
- Original Message - From: Andrius Jakutis [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, September 12, 2001 12:12 PM Subject: [PHP-DB] order by question Ok, here is the question: I write to order by date Order by date. So, it output's something like this: 2001 08 01

Re: [PHP-DB] order by question

2001-09-11 Thread Steve Farmer
Hi Andrius, try order by date desc Steve At 9:12 PM -0700 11/9/01, Andrius Jakutis wrote: Ok, here is the question: I write to order by date Order by date. So, it output's something like this: 2001 08 01 2001 08 02 2001 08 03 What if I want to order by date, but not from the older to