1
Venezia
How to find ID of the record just added?
  • 2003/10/16 8:29

  • Venezia

  • Just popping in

  • Posts: 36

  • Since: 2003/6/24


I'm using

$result = $xoopsDB->query("INSERT INTO " etc

to add a new record to a table. But I need to know the ID of the record that I have just added so that I can use it to rename a 'linked' file that has been uploaded to the /uploads directory.

What is the correct way to find the ID?

Thanks
Venezia

2
Mithrandir
Re: How to find ID of the record just added?

$newID = $xoopsDB->getInsertId();

3
Venezia
Re: How to find ID of the record just added?
  • 2003/10/17 1:03

  • Venezia

  • Just popping in

  • Posts: 36

  • Since: 2003/6/24


Thank you.

Login

Who's Online

255 user(s) are online (196 user(s) are browsing Support Forums)


Members: 0


Guests: 255


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Dec 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits