Groups
Groups
Sign in
Groups
Groups
atomikframework
Conversations
About
Send feedback
Help
DB Plugin : is there a way to fetch a "LAST_INSERT_ID()" value ?
1 view
Skip to first unread message
Kure
unread,
Dec 11, 2009, 6:17:18 AM
12/11/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to atomikframework
Hello everybody !
I'm new to Atomik Framework, and I have a little problem : I don't
know how to make a "SELECT LAST_INSERT_ID()" request on my database.
Do you have an idea ?
Thanks, Kure
(Sorry for english...)
Kure
unread,
Dec 11, 2009, 5:42:48 PM
12/11/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to atomikframework
It works this way :
[CODE]
Atomik_Db::insert('table', $values);
$last_ids=Atomik_Db::query('SELECT LAST_INSERT_ID()');
foreach($last_ids as $lid){
$last_id=$lid[0];
}
[/CODE]
Kure
Reply all
Reply to author
Forward
0 new messages