Hi,
I have the following query;-
When i run it in the SQL server management studio i get an integer as the result (as expected).
But when run this code in my application (PHP), i get the following error;-
Can anyone suggest why this may be happening.
I am trying to get the last inserted Id. Is there is a better way to do it? Suggestions welcome.
I have the following query;-
Code:
INSERT INTO media_cart (cart_name, cart_identifier, cart_owner_name, cart_xoops_user_id, cart_status)
VALUES ('newcart', 'xxx', 'jondoe', '36', '1');
SELECT SCOPE_IDENTITY() AS cart_ID;
When i run it in the SQL server management studio i get an integer as the result (as expected).
But when run this code in my application (PHP), i get the following error;-
Code:
The active result for the query contains no fields.
Can anyone suggest why this may be happening.
I am trying to get the last inserted Id. Is there is a better way to do it? Suggestions welcome.