An exception thrown when a query don't return the expected rows number

package salt\sql
inherited_from \salt\DBException

 Methods

Create a new RowCountException

__construct(string $message, string $query, integer $rowCount, integer $expectedRowCount) 
inherited_from \salt\DBException::__construct()

Parameters

$message

string

error message

$query

string

sql text query

$rowCount

integer

number of rows changed by query

$expectedRowCount

integer

expected number of rows changed by query

Create a new DBException

__construct(string $message, string $query, \PDOException $previous = NULL
Inherited

Parameters

$message

string

Exception message

$query

string

the SQL query

$previous

\PDOException

previous exception

Retrieve SQL text of the query

getQuery() : string
Inherited

Returns

stringsql query text

Retrieve exception code

getSqlStateErrorCode() : string
Inherited

Returns

stringsql SQLSTATE error code

 Properties

 

expected number of rows changed by query

$expectedRowCount : integer

Default

 

real number of rows changed by query

$rowCount : integer

Default

 

sql query

$query : string

Default

 

SQLSTATE error Code

$sqlStateErrorCode : string

Default

NULL

 Constants

 

<p>SQLSTATE exception code returned by \PDOException if table does not exists</p>

TABLE_DOES_NOT_EXISTS = '42S02' : string