Shopping cart again…
I’m inserting customer info into a customer table, using an auto_increment field for invoice number.
I’m using the mysql function “last_insert_id()” to retrieve the latest invoice number so I can insert associated purchases with the appropriate invoice number.
So far so good.
But I’d really like to be able to get that “last_insert_id()” number into a php variable so I could echo the customers invoice number and other info back to them for a printable invoice.
So…how to retrieve that last value of the “invoice number” field in the customers table efficiently, or how to store that “last_insert_id()” into a php variable?
thx