The physical order of the rows changed (as you can see) but it does not
re-use the id's that were deleted.
Ordering by the id will get you the last bunch inserted.
If you're using innodb you'll have to be aware it's transaction specific, if
you're using myisam it will be system wide.
I'll ha
On Mon, Mar 30, 2009 at 5:10 PM, Chris wrote:
> haliphax wrote:
>>
>> On Mon, Mar 30, 2009 at 9:13 AM, Sebastian Muszytowski
>> wrote:
>>>
>>> haliphax schrieb:
>
> [..cut...]
Except when your primary key value rolls over, or fills a gap between
two other rows that was left
haliphax wrote:
On Mon, Mar 30, 2009 at 9:13 AM, Sebastian Muszytowski
wrote:
haliphax schrieb:
[..cut...]
Except when your primary key value rolls over, or fills a gap between
two other rows that was left when a row was deleted/moved/etc... there
has got to be a better way than grabbing rows
On Mon, Mar 30, 2009 at 9:13 AM, Sebastian Muszytowski
wrote:
> haliphax schrieb:
>>>
>>> [..cut...]
>>
>> Except when your primary key value rolls over, or fills a gap between
>> two other rows that was left when a row was deleted/moved/etc... there
>> has got to be a better way than grabbing row
> Date: Mon, 30 Mar 2009 14:55:08 +0200
> From: s.muszytow...@googlemail.com
> To: p...@addmissions.nl
> CC: php-general@lists.php.net
> Subject: Re: [PHP] PHP + MySQL - Load last inserts
>
> Thijs Lensselink schrieb:
> > Sebastian Muszytowski wrote:
> >
&g
haliphax schrieb:
[..cut...]
Except when your primary key value rolls over, or fills a gap between
two other rows that was left when a row was deleted/moved/etc... there
has got to be a better way than grabbing rows in descending order
based on the auto_increment value.
Are you doing the inser
On Mon, Mar 30, 2009 at 7:55 AM, Sebastian Muszytowski
wrote:
> Thijs Lensselink schrieb:
>>
>> Sebastian Muszytowski wrote:
>>
>>>
>>> Hello :)
>>>
>>> I have some troubles with php and mysql. I have a normal MySQL Query
>>> and this returns X > 3 rows.
>>> Now i want to get the last 3 inserted
Thijs Lensselink schrieb:
Sebastian Muszytowski wrote:
Hello :)
I have some troubles with php and mysql. I have a normal MySQL Query
and this returns X > 3 rows.
Now i want to get the last 3 inserted values. For Example i've inserted
A, B, C, D, E
I want to get the last inserted values, e
>I have some troubles with php and mysql. I have a normal MySQL Query
>and this returns X > 3 rows.
>Now i want to get the last 3 inserted values. For Example i've inserted
>
>A, B, C, D, E
>
>I want to get the last inserted values, e.g. E D C (in reversed order)
>
>So how to do this? I already
Sebastian Muszytowski wrote:
> Hello :)
>
> I have some troubles with php and mysql. I have a normal MySQL Query
> and this returns X > 3 rows.
> Now i want to get the last 3 inserted values. For Example i've inserted
>
> A, B, C, D, E
>
> I want to get the last inserted values, e.g. E D C (in
10 matches
Mail list logo