|
Posted by Andy Hassall on 12/17/98 11:56
On Fri, 25 Aug 2006 16:55:39 GMT, "Frankie" <frankie66@earthlink.net> wrote:
[snip some insert statements]
>But this results in random entries by size.
>
>Is there a way to order these entries? If not, how would I use usort() to
>get the order I want?
Data in a table is unordered - you must always use an "ORDER BY" clause in the
SELECT statement if you want it out in a particular order. There's nothing you
can do on INSERT to guarantee an ordering - it doesn't work like that.
e.g.
select itemNumber, size, inStock
from inStockApparel
order by itemNumber, size
--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Navigation:
[Reply to this message]
|