Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2004
    Posts
    1

    Unanswered: 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

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    RTM?

    -PatP

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •