RE: [PHP] mySQL function
| From: | Christensen, BruceX R | Date: | Thu, 10 Aug 2000 01:47:18 +0000 |
| Subject: | RE: [PHP] mySQL function | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-11022@lists.php.net to get a copy of this message | ||
The records stored in a database are designed to be order-independent, so
it's not possible to change the order that they appear in the database
(physically). Instead, you specify how you want them sorted when you
retrieve them from the database using a query such as:
SELECT name, address, phone
FROM customers
ORDER BY name, DESC address
This query gets the name, address, and phone number of all customers listed
in the database table named "customers"; furthermore, it returns those
records sorted alphanumerically (actually by ASCII character code) by name,
and if two addresses are the same, it sorts in reverse order by the address.
For more information on SQL, check the Yahoo SQL club's links page.
--Bruce
Bruce Christensen
Intel Corporation
brucex.r.christensen@intel.com
-----Original Message-----
From: Craig Henderson [mailto:craigh@mail.ocis.net]
Sent: Wednesday, August 09, 2000 6:37 PM
To: php-general@lists.php.net
Subject: [PHP] mySQL function
Hey, I have a mySQL database that I am adding entries to via an online form.
What I want to do is sort the mySQL table each time a new entry is added.
So, since I'm not that familiar with mySQL (I haven't had time to learn it
yet) does anyone know of a PHP function that I can call to sort my database?
(I checked the online PHP manual and didn't see anything) Thanks in advance.
--Craig Henderson SAE, Adgrafix Corporation
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net