Re: Sorting, sort of
| From: | Analysis & Solutions | Date: | Mon, 06 May 2002 19:35:20 +0000 |
| Subject: | Re: Sorting, sort of | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-96312@lists.php.net to get a copy of this message | ||
On Mon, May 06, 2002 at 11:25:03AM -0800, Jason Soza wrote:
> I have a 'name' field in a MySQL table that contains people's first and
> last names,
> ... snip ...
> I'm thinking the easiest way to sort by last name, which is what I want
> to do, is to just go into MySQL and make 'first_name' and 'last_name'
> fields, but if there's a way to do this with PHP that'd be great
No, it wouldn't. You'd be wasting a lot of time and memory. Do the job
right. Separate the fields.
If you already have a large dataset, you can use PHP to do the initial
separation, but it'll be a pain.
--Dan
--
PHP classes that make web design easier
SQL Solution | Layout Solution | Form Solution
sqlsolution.info | layoutsolution.info | formsolution.info
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409