Re: displaying result problem
| From: | Richard Lynch | Date: | Tue, 16 May 2006 01:19:16 +0000 |
| Subject: | Re: displaying result problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-236255@lists.php.net to get a copy of this message | ||
On Fri, May 12, 2006 6:33 am, adi zebic wrote:
> I have little problem while displaying a result from one simple
> querry.
> If i insert values into mysql DB in following order (12, 3, 14, 4 )
> I allways have ( 12, 14, 3, 4 ) displaying when query the DB. (same
> with
> letters - dcba -> abcd etc)
> I would like to be able to display the data like they are inserted
> into
> database.
SQL *never* gurantees any particular order unless YOU impose it with
an ORDER BY clause.
It might *happen* to "work" for awhile, in some particular
implementation of SQL, but it ain't gonna survive for long, especially
once you start deleting values.
If you want an order, you gotta add/use a column that defines what
order you want and use ORDER BY.
--
Like Music?
http://l-i-e.com/artists.htm