Re: sorting troubles
| From: | chris smith | Date: | Sun, 23 Apr 2006 14:52:09 +0000 |
| Subject: | Re: sorting troubles | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-234586@lists.php.net to get a copy of this message | ||
> I have a column in DB that contains this kind of data,
> A20,B16,B17C14,C15,D13,D12 etc.
>
> I would like to print this data to a page and sort it ascending by the
> letter an descending by the number. Can this be done? Like
>
> A20
> B17
> B16
> C15
> C14
> D13
> D12
Depending on how many records you have and how many you want per page,
you might be better off doing this in your database query (eg you have
d01 -> d99 and only want to show 30 per page)...
Depending on which db you use, different syntaxes will apply.. so if
you need further help send which db and which version.
--
Postgresql & php tutorials
http://www.designmagick.com/