ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:reference:connection:insert_id

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
reference:insert_id [2015/12/12 17:42] mnewnhamv5:reference:connection:insert_id [2018/06/11 10:16] – [Usage] function names starting with lowercase (#426) dregad
Line 17: Line 17:
 ===== Postgresql / SAP MaxDB ===== ===== Postgresql / SAP MaxDB =====
  
-The only drivers that __require__ the optional ''$table'' and ''$column'' arguments are [[database:Postgresql]] and [[database:SAP MaxDB]] as they support table and column specific insert id numbers.+The only drivers that __require__ the optional ''$table'' and ''$column'' arguments are [[v5:database:postgresql]] and [[v5:database:sap_maxdb]] as they support table and column specific insert id numbers.
  
 ===== Usage ===== ===== Usage =====
Line 29: Line 29:
  * Insert into table with auto-increment column, current highest value 100  * Insert into table with auto-increment column, current highest value 100
  */  */
-$db->Execute('INSERT INTO monkeys (type) value "arctic"');+$db->execute('INSERT INTO monkeys (type) value "arctic"');
 $lastId = $db->insert_Id(); $lastId = $db->insert_Id();
 print $lastId; print $lastId;
Line 39: Line 39:
  * Insert into a different table with auto-increment, current highest value 50.  * Insert into a different table with auto-increment, current highest value 50.
  */  */
-$db->Execute('INSERT INTO pickups (type) value "F150"');+$db->execute('INSERT INTO pickups (type) value "F150"');
 $lastId = $db->insert_Id(); $lastId = $db->insert_Id();
 print $lastId; print $lastId;
v5/reference/connection/insert_id.txt · Last modified: 2023/06/20 09:40 by dregad