I'm trying to insert a row into an MSSQL7 table using the SQL string:

INSERT INTO person (birthdate,deathdate,sname,othername,motherid,fatherid)
VALUES ('1978-10-06',NULL,'Fairs','Daniel',NULL,NULL) SELECT @@identity AS

The actual PHP code is
$oRes = mssql_query("SET NOCOUNT ON " . $sSQL, $this->iConnIndex) ;
if ($oRes) echo "yea" ; else echo "nay" ; die() ;

... and 'nay' gets printed....

I've tried both SET NOCOUNT ON and SET NOCOUNT OFF, and also omitting the
SET NOCOUNT completely. Any ideas why I'm not getting the last id back?


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]

Reply via email to