Re: Sort Tables
| From: | Jim Hunter | Date: | Thu, 01 Jan 1970 00:00:00 +0000 |
| Subject: | Re: Sort Tables | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-19400@lists.php.net to get a copy of this message | ||
Generally speaking, you should never worry about the way the data is 'stored
only about the way it's returned to you in a query. Since the only way to
use the data is in a query, you never need to know how it is stored. Let me
guess, you come from the world of flat files like paradox, Access etc.?
MySQL is a relational database. Think of a mySQL table as a big pot of
information and the only 'structure' that you are to know, are the field
names and types and the indexes (and a few other pieces of information). And
you use this information to create queries in order to 'view' the data.
Relational databases would not be able to keep up their speed if they had to
actually store the information in a logical sort order, that is why they
store it in 'natural' order as it is written to the table. Then they use
indexes to view the information in a sorted order.
All in all, it's done for speed.
Jim
-------Original Message-------
From: Trystano@aol.com
Date: Friday, April 11, 2003 13:27:36
To: php-windows@lists.php.net
Subject: [PHP-WIN] Sort Tables
>Check auto-increment checkbox in MySQL table preferences
I've got that already setup within the primary key.
I was just wondering if there was a command that allowed me to sort the
table
into ascending order by primary key.
Or is the only way to do it is when querying data from a table and then
sorting the results of that query.
Tryst
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
.