|
|
 |
Re: FN-FORUM: Mysql syntax help
date posted 1st May 2008 19:51
On Thu, 2008-05-01 at 19:10 +0000, Dom Latter wrote:
> On Thursday 01 May 2008 20:17:56 Graham Stark wrote:
>
> > What's the alternative? There's no timestamp field there, so far as I
> > can see, so you can't pick the entry that's actually the latest, if for
>
> If there's a requirement for "get latest addition" then there's a requirement
> for a "date_added" field.
But (so far as I can see) there isn't such a field. So what's to do? You
can't just say 'redesign your database, then come back', unless it's
something really pathological.
> > some reason the ID fields are mixed up. And, in this case, the ids
> > won't be mixed up, provided they are not being set manually.
>
> Or that the code is moved to an (MySQL or otherwise) engine that does
> re-use IDs, or issue them out of order. Moving the database to another
> server might also muck up your IDs.
>
Sure.
> I've not seen anything in the docs that says that the MySQL engine
> MUST issue IDs in order, without re-use. If anybody can find something
> like that, I'd be very interested.
>
>
Here:
http://dev.mysql.com/doc/refman/5.1/en/example-auto-increment.html
To be fair, it's implied rather than stated (in the section
on how ISAM tables with composite keys *don't* behave like this).
Graham
|
 |
|