Jump to content

How to retrieve the last auto-incremented ID?


ivytony

Recommended Posts

After a customer places an order on my online eshop, I would like to show him/her the order number (the primary auto-incremented ID in mysql database table 'order') on the confirmation page and send the order number to his/her email automatically.

 

My thinking is to get the last auto-incremented ID and then plus 1 as the order number. Is this right to do?

 

I am wondering how to do this?

 

thanks!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.