Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^2: database not in correct order

by Anonymous Monk
on Nov 27, 2007 at 03:03 UTC ( [id://653135]=note: print w/replies, xml ) Need Help??


in reply to Re: database not in correct order
in thread database not in correct order

The sort is done by the primary key ID. The time is entered in as 0:0:0 because I originally didn't store time in my original DB_File database but I'm going to start recording it now.

Replies are listed 'Best First'.
Re^3: database not in correct order
by dws (Chancellor) on Nov 27, 2007 at 05:42 UTC

    The sort is done by the primary key ID.

    Assuming that you created the table with

    ... id int auto_increment, primary key (id), ...

    and you don't specify an ORDER BY clause for something other than id, you should get the records back in the order you put them in.

    Is it possible you forgot the auto_increment?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://653135]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2024-04-19 10:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found