Re: Store data in array
| From: | Uma Shankari T. | Date: | Mon, 18 Mar 2002 11:24:30 +0000 |
| Subject: | Re: Store data in array | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-88910@lists.php.net to get a copy of this message | ||
On Mon, 18 Mar 2002, Andrey Hristov wrote:
AH>If it is possible do the sorting in the SQL statement by using ORDER BY. SQL sorting is much
AH>faster than in PHP.
AH>However
I have gone through that manual already....but i need to sort by php
sorting.
AH>while ($row= mysql_fetch_assoc($res)){ $rows[] = $row; }
AH>
I have tried this but while sorting using php sort it is displaying array
only.If the elements are stored in the array properly i can perform
sorting.
please tell me how to extract a specific field from mysql database and
store it in array...
AH>Then you have many ways to sort. Look at : sort(), asort(), arsort(), usort(), uasort() etc.
AH>
AH>Best regards,
AH>Andrey Hristov
AH>
AH>----- Original Message -----
AH>From: "Uma Shankari T." <umashankari@lantana.tenet.res.in>
AH>To: <php-general@lists.php.net>
AH>Sent: Monday, March 18, 2002 12:25 PM
AH>Subject: [PHP] Store data in array
AH>
AH>
AH>>
AH>>
AH>> Hello,
AH>>
AH>> Anyone can please tell me how to store the row details fetched from
AH>> database to array so that to sort the same array after storing....
AH>>
AH>>
AH>> -Uma
AH>>
AH>>
AH>> --
AH>> PHP General Mailing List (http://www.php.net/)
AH>> To unsubscribe, visit: http://www.php.net/unsub.php
AH>>
AH>>
AH>