note 27515 deleted from function.array-multisort by aidan
| From: | aidan@php.net | Date: | Sun, 08 Aug 2004 17:44:50 +0000 |
| Subject: | note 27515 deleted from function.array-multisort by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-74257@lists.php.net to get a copy of this message | ||
Note Submitter: albanacN-O-S-P-A-M@N-OS-PA-Mgmx.de
----
when sorting a sql request always keep in mind the time factor...
although your sorting function may be fast, you always have to keep in mind that the result given by
the db is already sorted
In my opinion array sorting (of a mysql result) is only necessary when dealing with colums that
require queries.
eg:
table:
no |Name |friends
1 |mnyh |1,2
2 |nich |3,4
3 |doch |1,2,3,4
4 |yeah |4,1
sorting by name or no is possible by adding a where clause in the MySql statement, but sorting by
the AMOUNT of friends is only possible with php array sorting
please correct me if I'm wrong