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

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

[PHP-DB] ORDER BY question

2002-02-21 Thread Chris Payne
Hi there everyone, Using PHP and MySQL, how can I do an ORDER BY where city = $city? What happens is this, I have a search engine which works nicely, but I want to bring up the closest matches to the search first at the top, how can I do this? Say you enter Munich Hotels, I want all entries w

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 o

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". > >

[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.