With mysql you can do mysql_insert_id. The following code should do what
you need in mssql.
$query="InsertRequest
'1','2','3','4/11/01','5','6','7','8','9/11/01','10/11/01','11','12','13','1
4','15','';
$return=MSSQL_QUERY($query);
$id=mssql_query("select @@IDENTITY as 'taskid'");
$taskid=mssql_fetch_array($id);
$taskid will then be whatever mssql set your identity/autoincrement field
to be.
Regards,
Tony
--
Tony McCrory
IT, Trinity Mirror group (Ireland)
(028) 9068 0168
[EMAIL PROTECTED]
Ryan Marrs
<rmarrs@strtr To: "'[EMAIL PROTECTED]'"
<[EMAIL PROTECTED]>
ade.com> cc:
Subject: [PHP-DB] Issue with
MSSQL_QUERY()
07/03/2001
08:14 PM
I've run into an issue using MSSQL_QUERY() that I cannot seem to figure out
a work-around for. The last field in the query is an auto-increment
starting at 100,000. I need the MSSQL_QUERY($query) statement to print out
the result of the query (which is a stored procedure in case that wasn't
obvious). Instead it returns True (1) or False (0?). Does anyone have
suggestions? I am completely stumped at this point.
Thanks!
Ryan
$query="InsertRequest
'1','2','3','4/11/01','5','6','7','8','9/11/01','10/11/01','11','12','13','1
4','15','';
$return=MSSQL_QUERY($query);
$taskid=$return;
-RESULT -
$taskid = 1
IMPORTANT NOTICE The information in this e-mail is confidential and should
only be read by those persons to whom it is addressed and is not intended
to be relied upon by any person without subsequent written confirmation of
its contents. Furthermore, the content of this e-mail is the personal view
of the sender and does not represent the advice, views or opinion of our
company. Accordingly, our company disclaim all responsibility and accept
no liability (including in negligence) for the consequences of any person
acting, or refraining from acting, on such information prior to the receipt
by those persons of subsequent written confirmation. In particular (but
not by way of limitation) our company disclaims all responsibility and
accepts no liability for any e-mails which are defamatory, offensive,
racist or in any other way are in breach of any third party's rights,
including breach of confidence, privacy or other rights. If you have
received this e-mail message in error, please notify me immediately by
telephone. Please also destroy and delete the message from your computer.
Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and/or publication of this e-mail message is strictly
prohibited. Trinity Mirror plc is the holding company for the Trinity
Mirror group of companies and is registered in England No. 82548, with its
address at Kingsfield Court, Chester Business Park, Chester CH4 9RE.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]