note 27515 added to function.array-multisort

From: Date: Mon, 09 Dec 2002 16:21:12 +0000
Subject: note 27515 added to function.array-multisort
Groups: php.notes 
Request: Send a blank email to php-notes+get-40574@lists.php.net to get a copy of this message
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 -- http://www.php.net/manual/en/function.array-multisort.php http://master.php.net/manage/user-notes.php?action=edit+27515 http://master.php.net/manage/user-notes.php?action=delete+27515 http://master.php.net/manage/user-notes.php?action=reject+27515

« previous php.notes (#40574) next »