SqlsrvPDO
extends PDO
in package
This is an extension of the default PDO class of SQLSRV driver.
It provides workarounds for improperly implemented functionalities of the SQLSRV driver.
Tags
Table of Contents
Methods
- lastInsertId() : int
- Returns value of the last inserted ID.
Methods
lastInsertId()
Returns value of the last inserted ID.
public
lastInsertId([string|null $sequence = null ]) : int
SQLSRV driver implements [[PDO::lastInsertId()]] method but with a single peculiarity:
when $sequence
value is a null or an empty string it returns an empty string.
But when parameter is not specified it works as expected and returns actual
last inserted ID (like the other PDO drivers).
Parameters
- $sequence : string|null = null
-
the sequence name. Defaults to null.
Attributes
Return values
int —last inserted ID value.