TDbCommand class.
TDbCommand represents an SQL statement to execute against a database. It is usually created by calling TDbConnection::createCommand. The SQL statement to be executed may be set via Text.
To execute a non-query SQL (such as insert, delete, update), call execute. To execute an SQL statement that returns result data set (such as select), use query or its convenient versions queryRow and queryScalar.
If an SQL statement returns results (such as a SELECT SQL), the results can be accessed via the returned TDbDataReader.
TDbCommand supports SQL statment preparation and parameter binding. Call bindParameter to bind a PHP variable to a parameter in SQL. Call bindValue to bind a value to an SQL parameter. When binding a parameter, the SQL statement is automatically prepared. You may also call prepare to explicitly prepare an SQL statement.
Located in /Data/TDbCommand.php (line 39)
TComponent | --TDbCommand
Constructor.
Binds a parameter to the SQL statement to be executed.
Binds a value to a parameter.
Cancels the execution of the SQL statement.
Executes the SQL statement.
This method is meant only for executing non-query SQL statement. No result set will be returned.
Prepares the SQL statement to be executed.
For complex SQL statement that is to be executed multiple times, this may improve performance. For SQL statement with binding parameters, this method is invoked automatically.
Executes the SQL statement and returns query result.
This method is for executing an SQL query that returns result set.
Executes the SQL statement and returns the first column of the result.
This is a convenient method of query when only the first column of data is needed. Note, the column returned will contain the first element in each row of result.
Executes the SQL statement and returns the first row of the result.
This is a convenient method of query when only the first row of data is needed.
Executes the SQL statement and returns the value of the first column in the first row of data.
This is a convenient method of query when only a single scalar value is needed (e.g. obtaining the count of the records).
Specifies the SQL statement to be executed.
Any previous execution will be terminated or cancel.
Set the statement to null when serializing.
Inherited From TComponent
TComponent::addParsedObject()
TComponent::attachEventHandler()
TComponent::canGetProperty()
TComponent::canSetProperty()
TComponent::createdOnTemplate()
TComponent::detachEventHandler()
TComponent::evaluateExpression()
TComponent::evaluateStatements()
TComponent::getEventHandlers()
TComponent::getSubProperty()
TComponent::hasEvent()
TComponent::hasEventHandler()
TComponent::hasProperty()
TComponent::raiseEvent()
TComponent::setSubProperty()
TComponent::__get()
TComponent::__set()
Documentation generated on Mon, 21 Apr 2008 11:34:51 -0400 by phpDocumentor 1.3.0RC4