#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Posts
    1
    Rep Power
    0

    Mssql multiple queries insert queries and results


    Hello,
    in php I'm executing multiple queries at once, the queries are wrote in one big variable. These are insert queries and I have to retrieve each autoincrement "id" of the records created in the db. How to do it ? The results set retrieved don't seems to keep each single result but just one.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    117
    Rep Power
    9
    Originally Posted by gulp
    Hello,
    in php I'm executing multiple queries at once, the queries are wrote in one big variable. These are insert queries and I have to retrieve each autoincrement "id" of the records created in the db. How to do it ? The results set retrieved don't seems to keep each single result but just one.
    I'm not sure where is your problem, but you can execute multiple query in once, just separate them by ; if you need more complex staff you can create stored procedure and implement any logic there. in thins case you will need just call that stored procedure with parameters from ANY application

IMN logo majestic logo threadwatch logo seochat tools logo