Re: retrieving field names in ascending order
| From: | graeme_foster | Date: | Tue, 13 Sep 2005 13:21:44 +0000 |
| Subject: | Re: retrieving field names in ascending order | ||
| References: | 1 2 3 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-40258@lists.php.net to get a copy of this message | ||
how about usort($myarray, "strcasecmp");
graeme
hope wrote:
Well now i m retrieving results into an array Then i m using sort($myarray) but the problem is that it sorts in this way ( e.g.ABB MBBZZZ abc def ztt ) i.e it sorts capital letters first n then it sorts the small letters but i want the display to sort in ascending order whether it is capital or smal lettr. i want my output to look like this ( abc ABB def MBB ztt ZZZ ) even if i use parameter sort($myarray, SORT_ASC); doesnt help. Regards hope Bastien Koert wrote:AFAIK you can't order theSHOW COLUMNS from TABLEYo could pass the results to an array and sort it in the arrayBastienFrom: umeed921@yahoo.com (hope) To: php-db@lists.php.net Subject: [PHP-DB] retrieving field names in ascending order Date: Thu, 08 Sep 2005 04:23:31 -0400 hi how can i retrieve field names from a table(e.g products_attributes) in ascending order??? i need to display each of the fieldnames alongwith its datatype and length on the page. regards hope -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php