Re: displaying result problem

From: Date: Fri, 12 May 2006 12:19:31 +0000
Subject: Re: displaying result problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-236061@lists.php.net to get a copy of this message
On 5/12/06, adi zebic <azebic@gmail.com> wrote:
Hi, 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.
A database will order things randomly unless you tell it how to order the results. As Tedd suggested, add an id field and then you can order by that field: select * from table order by id ASC; http://dev.mysql.com/doc/refman/5.1/en/sorting-rows.html -- Postgresql & php tutorials http://www.designmagick.com/

« previous php.general (#236061) next »