Query Helper Methods
The insert ID number when performing database inserts.
Note
If using the PDO driver with PostgreSQL, or using the Interbasedriver, this function requires a $name parameter, which specifies theappropriate sequence to check for the insert id.
$db->affectedRows()
Note
In MySQL “DELETE FROM TABLE” returns 0 affected rows. The databaseclass has a small hack that allows it to return the correct number ofaffected rows. By default this hack is enabled but it can be turned offin the database driver file.
$db->getLastQuery()
Returns a Query object that represents the last query that was run (the query string, not the result).
Information About Your Database
Permits you to determine the number of rows in a particular table.Submit the table name in the first parameter. This is part of Query Builder.Example:
$db->getPlatform()
Outputs the database platform you are running (MySQL, MS SQL, Postgres,etc…):
$db->getVersion()