Re: mysql 4.0.2 preoblem

2004-08-04 Thread Michael Stassen
That's how dbs work.  When rows are deleted, they reclaim that space when 
new rows are inserted.  Hence, there is no last row (in fact, no order at 
all) unless you explicitly order the results in your select.  That's what 
ORDER BY is for.  Try

  SELECT autoinc_field, data_field FROM yourtable ORDER BY autoinc_field;
By the way, if you are really using mysql 4.0.2, you should consider an 
upgrade.  4.0.2 is over 2 years old.  The current version is 4.0.20, and 
there have been a lot of improvements and bug fixes since 4.0.2.

Michael
Cres Justado wrote:
can anyone help me with my problem regarding mysql 4.0.2. I'm having a 
problem with the sequencing of the auto incremnt field. if my 
application makes an insert mysql inserts the new row somewhere in the 
middle of the sequence. example

autoinc_field   data_field
1   qwe
2   ert
3   ou
20 oiu
4  ngf
5  ljn
.
.
.
.
18okj
19thd
in my example the row 20 was inserted in the middle of the sequence 
instead of inserting  it in the last row.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: mysql 4.0.2 preoblem

2004-08-04 Thread gerald_clark
If you want them ordered by autoinc_field then add
ORDER BY autoinc_field.
Otherwise expect them to be returned  in any order.
Cres Justado wrote:
can anyone help me with my problem regarding mysql 4.0.2. I'm having a 
problem with the sequencing of the auto incremnt field. if my 
application makes an insert mysql inserts the new row somewhere in the 
middle of the sequence. example

autoinc_field   data_field
1   qwe
2   ert
3   ou
20 oiu
4  ngf
5  ljn
.
.
.
.
18okj
19thd
in my example the row 20 was inserted in the middle of the sequence 
instead of inserting  it in the last row.

_
The new MSN 8: smart spam protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


mysql 4.0.2 preoblem

2004-08-03 Thread Cres Justado
can anyone help me with my problem regarding mysql 4.0.2. I'm having a 
problem with the sequencing of the auto incremnt field. if my application 
makes an insert mysql inserts the new row somewhere in the middle of the 
sequence. example

autoinc_field   data_field
1   qwe
2   ert
3   ou
20 oiu
4  ngf
5  ljn
.
.
.
.
18okj
19thd
in my example the row 20 was inserted in the middle of the sequence instead 
of inserting  it in the last row.

_
The new MSN 8: smart spam protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]