Hey All,
I've got a logic question that I'm pretty sure there are multiple answers to, but my way appears to be flawed, so I'm seeking better answers.
I have a registration table that will have one entry per person. They can then purchase many tickets as to need. When I go into ticket sales and they choose 1 or more tickets, and hit save, the first thing is to check the registration table to see if they are registered. If they are, I use the ID from Registration and tie it to the tickets table. If they aren't, I create a record for them, then re-query the MariaDB database to find that record and get the Registration ID.
The problem is that I have multiple computers going registering people and apparently I'm not finding the ID properly because I've got several -1's (the default ID) in the ticket table.
What is the best, or most elegant way, of getting the ID that's generated in the Registration table after I do an insert on a MariaDB database?
Thanks in advance.
Jim