Db\Adapter::getDialect

public getDialect () Returns internal dialect instance

Db\Adapter::getDescriptor

public getDescriptor () Return descriptor used to connect to the active database

Db\Adapter::getDefaultValue

public getDefaultValue () Returns the default value to make the RBDM use the default value declared in the table definition //Inserting a new robot with a valid default value for the column 'year' $success = $connection->insert( "robots", array("Astro Boy", $connection->getDefaultValue()), array("name", "year") );

Db\Adapter::getDefaultIdValue

public getDefaultIdValue () Returns the default identity value to be inserted in an identity column //Inserting a new robot with a valid default value for the column 'id' $success = $connection->insert( "robots", array($connection->getDefaultIdValue(), "Astro Boy", 1952), array("id", "name", "year") );

Db\Adapter::getConnectionId

public string getConnectionId () Gets the active connection unique identifier

Db\Adapter::getColumnList

public string getColumnList (array $columnList) Gets a list of columns

Db\Adapter::getColumnDefinition

public getColumnDefinition (Phalcon\Db\ColumnInterface $column) Returns the SQL column definition from a column

Db\Adapter::forUpdate

public forUpdate (mixed $sqlQuery) Returns a SQL modified with a FOR UPDATE clause

Db\Adapter::fetchOne

public fetchOne (mixed $sqlQuery, [mixed $fetchMode], [mixed $bindParams], [mixed $bindTypes]) Returns the first row in a SQL query result //Getting first robot $robot = $connection->fetchOne("SELECT * FROM robots"); print_r($robot); //Getting first robot with associative indexes only $robot = $connection->fetchOne("SELECT * FROM robots", Phalcon\Db::FETCH_ASSOC); print_r($robot);

Db\Adapter::fetchColumn

public string | ** fetchColumn (string $sqlQuery, [array $placeholders], [int | string $column]) Returns the n’th field of first row in a SQL query result //Getting count of robots $robotsCount = $connection->fetchColumn("SELECT count(*) FROM robots"); print_r($robotsCount); //Getting name of last edited robot $robot = $connection->fetchColumn("SELECT id, name FROM robots order by modified desc", 1); print_r($robot);