|
| |||||||||
| Tags: multiple columns, order |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| order by multiple
I want to order multiple columns, with such away that it gives me the last name first & then the name & then shows the state. as shown in the following example : Code: Output : Mehta Abrahim, Gujarat Sumra Atique, Maharashtra Shah Kevin, Maharashtra Gada Kushal, Gujarat |
|
#2
| ||||
| ||||
| Re: order by multiple
To get the output you require to use the following PHP Syntax Code: $query = "select * from table order by field2,field3,field4"; |
|
#3
| ||||
| ||||
| Re: order by multiple
You are the implementation of following SQL-instructie on the aforesaid table. Code: SELECT * FROM `lastname` ORDER BY name ASC , state DESC |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "order by multiple" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Pre - order with delivery or pre order with stand in line for iPhone 4S? | Skyla | Portable Devices | 6 | 09-10-2011 07:31 PM |
| multiple Domains under one domain or multiple forests under oneforest | Rush | Active Directory | 7 | 24-11-2009 11:57 AM |
| Multiple inboxes for multiple accounts | bmccaul | Windows Vista Mail | 4 | 20-09-2009 03:14 AM |
| How to change binding order to add multiple IP addresses on Windows Server 2003 | Hajra | Networking & Security | 3 | 28-07-2009 08:55 PM |
| How to copy multiple files to multiple destination at a time | Aaryn | Windows Software | 3 | 14-05-2009 11:25 AM |