Re: displaying result problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux