Метод | Описание | |
---|---|---|
__construct ( |
Constructor. | |
__sleep ( ) | Set the statement to null when serializing. | |
bindParameter ( $name, &$value, $dataType = null, $length = null ) | Binds a parameter to the SQL statement to be executed. | |
bindValue ( $name, $value, $dataType = null ) | Binds a value to a parameter. | |
cancel ( ) | Cancels the execution of the SQL statement. | |
execute ( ) : integer | Executes the SQL statement. | |
getConnection ( ) : |
||
getDebugStatementText ( ) : String | ||
getPdoStatement ( ) : PDOStatement | ||
getText ( ) : string | ||
prepare ( ) | Prepares the SQL statement to be executed. | |
query ( ) : |
Executes the SQL statement and returns query result. | |
queryColumn ( ) : array | Executes the SQL statement and returns the first column of the result. | |
queryRow ( $fetchAssociative = true ) : array | Executes the SQL statement and returns the first row of the result. | |
queryScalar ( ) : mixed | Executes the SQL statement and returns the value of the first column in the first row of data. | |
setText ( $value ) | Specifies the SQL statement to be executed. |
public __construct ( |
||
$connection |
public bindParameter ( $name, &$value, $dataType = null, $length = null ) |
public bindValue ( $name, $value, $dataType = null ) |
public getConnection ( ) : |
||
Результат | the connection associated with this command |
public getDebugStatementText ( ) : String | ||
Результат | String | prepared SQL text for debugging purposes. |
public getPdoStatement ( ) : PDOStatement | ||
Результат | PDOStatement | the underlying PDOStatement for this command It could be null if the statement is not prepared yet. |
public prepare ( ) |
public query ( ) : |
||
Результат | the reader object for fetching the query result |
public queryColumn ( ) : array | ||
Результат | array | the first column of the query result. Empty array if no result. |
public queryScalar ( ) : mixed | ||
Результат | mixed | the value of the first column in the first row of the query result. False is returned if there is no value. |
public setText ( $value ) |