Hi.

On Fri, Feb 22, 2002 at 10:54:55AM +0200, [EMAIL PROTECTED] wrote:
> Hallo
> 
> Is there a way to set the order in which data gets placed into the db?

No. With SQL you specify the order not on insertion but on seletion
time.

> I have a form with ten rows (input fields) they are labeled name[1],
> name[2],name[3],name[4]
> 
> I then use a for statement incrementing $i up to 10 i.e &name[$1] this
> loop contains my query (INSERT INTO DB...) but if I check my database I
> see that for example row 3 is at the top, followed by 1 then 2 and then
> 4 - this makes no sense to me , should it not go from 1 - insert it - go
> to the next row 2 - insert it, and so on.

That's how the standard specifies it: The internal order of the DBMS
is undefined (i.e. abitrary) and you may not rely on it.

To get them in order, simply insert the value of $i or something
similar into an extra column and specify it at retrieval time (with
the ORDER BY clause).

Bye,

        Benjamin.

-- 
[EMAIL PROTECTED]

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to