
Need help on Getting Trouble Ticket No
I am using insert statement and auto generated field into tbproblem table. To get the latest auto number by issuing mysql_insert_id() immediately after insert statement.
My question, is there any possibilities that i will get someone else last insert id due to concurrent users issuing insert statement into tbproblem table during online. If the case what is the best solution to get ticket id?
I think the secure way but long and slow:
1. Execute insert statement insert into tbproblem (reporter, desc, date,..)
2. execute query : select ticketid from tbproblem where desc="$desc" and reporter="$repname" and date="$date"