This topic is locked

function db_insertid

7/31/2007 11:48:24 AM
PHPRunner General questions
D
daviesgh author

Hi,
PHPRunner 4.0 Build 265
There is a function db_insertid defined in dbconnection for mysql but not for microsoft sql server
Will there be any issues for the following function for microsoft sql server?
function db_insertid($qhandle)

{

$strSQL = "select @@IDENTITY as indent";

$rs = db_query($strSQL,$qhandle);

$row = db_fetch_array($rs);

return $row["indent"];

}
Regards,
Gordon

J
Jane 8/1/2007

Gordon,
you can add this function to the include/dbconnection.php file and then use it in your code.