Thank you all for help
L.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL
Andy Shaw wrote:
> lowest ID, or you can write a custom SQL query to do the same thing. I
> don't know if Django currently has a built-in feature to let you do
> this, though it is possible that the database will return the records in
Julio Nobrega wrote:
> first_record = models.get_list(order_by
Le Mercredi 8 Mars 2006 14:26, Andy Shaw a écrit :
> PythonistL wrote:
> > Hi,
> > is there a way how to find out id of the first record in a table?
> > I will explain what I mean.
> > When I insert the first record into a table the id is 1.
> > when I insert ne
Something like this perhaps...
first_record = models.get_list(order_by = ['id'], limit = 1)[0]
Maybe even .get_object() if it works with limit 1.
On 3/8/06, Andy Shaw <[EMAIL PROTECTED]> wrote:
>
> As the ID field is auto-incremented, the earliest ('first') record will
> be the one with t
PythonistL wrote:
> Hi,
> is there a way how to find out id of the first record in a table?
> I will explain what I mean.
> When I insert the first record into a table the id is 1.
> when I insert next record, the id for this record will be 2.
> But if I delete the first rec
Hi,
is there a way how to find out id of the first record in a table?
I will explain what I mean.
When I insert the first record into a table the id is 1.
when I insert next record, the id for this record will be 2.
But if I delete the first record, the id of the first record will be 2
.So, I
6 matches
Mail list logo