Re: PHP, SiteSpinner and MS SQL2000

From: Date: Fri, 07 Nov 2003 19:30:51 +0000
Subject: Re: PHP, SiteSpinner and MS SQL2000
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-168889@lists.php.net to get a copy of this message
Rique Gresham wrote:
Hi All, What I'm trying to do is query a mssql database using a SELECT statement to get the last report number from a table, increment that number by 1 and have it display in a INPUT box. The data will not INSERT into the database as a new record until one presses the SUBMIT button.
I believe @@IDENTITY holds the last auto-increment for MSSQL. You can use that to retrieve the last inserted record (assuming you have an auto-increment id field). This should work "SELECT @@IDENTITY" But I'm not a MSSQL guru or anything, so apologies if that doesn't work for you. -- Burhan Khalid phplist[at]meidomus[dot]com http://www.meidomus.com ----------------------- "Documentation is like sex: when it is good, it is very, very good; and when it is bad, it is better than nothing."

« previous php.general (#168889) next »