View unanswered posts | View active topics It is currently Mon Sep 26, 2022 11:11 am

Reply to topic  [ 1 post ] 
 Need help on Getting Trouble Ticket No 
Author Message
Junior Member

Joined: Sun Oct 21, 2007 8:51 pm
Posts: 1
Post 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"

Sun Oct 21, 2007 9:14 pm
Report this post
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 0 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
© Copyright 2003-2008 The ultimate PHP Editor and PHP IDE site.