View Single Post
Old 10-19-2004, 08:41 PM  
Lane
Will code for food...
 
Join Date: Apr 2001
Location: Buckeye, AZ
Posts: 8,496
here is a little example of why order of the table is not the order of the inserted rows:


CREATE TABLE `a` (
`b` int(11) NOT NULL default '0'
) TYPE=INNODB;

INSERT INTO `a` ( `b` )
VALUES (
'0'
);


INSERT INTO `a` ( `b` )
VALUES (
'1'
);


INSERT INTO `a` ( `b` )
VALUES (
'2'
);

DELETE FROM `a` WHERE `b` = 1;


INSERT INTO `a` ( `b` )
VALUES (
'3'
);


SELECT *
FROM `a`;

this will give you:
0
3
2

not:
0
2
3


See what i mean?
__________________
Lane is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote