Results 1 to 2 of 2

Thread: insert_id();

  1. #1
    Join Date
    Jun 2002
    Posts
    173

    Unanswered: insert_id();

    I'm using php to attempt to retrieve the new primary key of a newly inserted record. I'm using adodb:

    $last_id = $base2->Insert_ID();

    last_id didn't work at first. Then I turned on OID's on the table. Now last_id always equals "-1", which isn't correct either. Does anyone know how to solve this?

  2. #2
    Join Date
    Apr 2003
    Posts
    23
    select currval(serial_used_for_counter);

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •