If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Getting the Result of an previous INSERT Statement

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-24-04, 06:26
klix klix is offline
Registered User
 
Join Date: Aug 2004
Posts: 1
Getting the Result of an previous INSERT Statement

Hello!

I've got a problem and have no solution on it.

I've written a script which writes data in a mysql table nd i want the result of this statement to work with it.

First I wanted to send an SELECT statement directly after my INSERT statement. It's possible because every entry in my table has an id wich is auto_increment. So i could sort it by the highest number and that my result.

But I think it's problematic when more than one user work on the same table because my SELECT statement has du be executed directly after my INSERT statement. Because when another user sends also a INSERT statement for the same table it could be possible that these statement is executed between my own SELECT ans INSERT statement, isn't it? In that case i would get the wrong result.

So long description for a short question: How do i get the result of an INSERT statement before any other statement is executed?

Thanks
Sascha
Reply With Quote
  #2 (permalink)  
Old 08-24-04, 08:43
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,606
RTM?

-PatP
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On