last_insert_id = db.insert()

db.insert() returns the last insert id

On Thu, Mar 26, 2009 at 6:53 PM, mathew wong <[email protected]> wrote:

> Thanks for the quick replies! So how do I extract the last id from
> db.insert()? I can see the id but I have no idea how to get the id and do
> something with it...
>
> Thanks
> Mathew
>
> On Thu, Mar 26, 2009 at 6:39 PM, ashok raavi <[email protected]>wrote:
>
>>
>>
>> db.insert()  returns the last insert id
>>
>>
>>
>>
>> On Thu, Mar 26, 2009 at 2:15 PM, Mathew <[email protected]> wrote:
>>
>>>
>>> Hi I would like to know how can one extract the mysql_insert_id from
>>> web.py's stock ORM? In PHP all you have to call is the aforementioned
>>> function I think, there you can get the last insert id of the most
>>> recent row insert from a auto_increment enabled table.
>>>
>>> Thanks,
>>> Mathew
>>>
>>>
>>
>>
>> --
>> ashok raavi
>>
>>
>>
>>
>
> >
>


-- 
ashok raavi

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to