The following warnings occurred: | ||||||||||||
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
|
ID of a record I just added - Printable Version +- UserSpice (https://userspice.com/forums) +-- Forum: Miscellaneous (https://userspice.com/forums/forumdisplay.php?fid=28) +--- Forum: Documentation (https://userspice.com/forums/forumdisplay.php?fid=30) +--- Thread: ID of a record I just added (/showthread.php?tid=958) |
ID of a record I just added - marciocaparica - 02-16-2018 Hello! I want to set up a relational table. So I need to get the id of a record I just added and use it on another. What is the best way to get the ID of the record I just added to the database? Thank you! M! ID of a record I just added - dan - 02-16-2018 right after you do your insert query, do $id = $db->lastId(); |