WIKINDX METHODS

Method:
query()

Class:
SQL

Method Call:
include_once("core/sql/SQL.php");
$db = new SQL();
ADODB_RECORDSET $db->query(STRING: $sqlStatement);

Description:
Executes a SQL query with $sqlStatement.

The return is a ADODB_RECORDSET suitable for passing to the fetchRow(), loopRecordSet() or fetchOne() methods etc. If it fails to execute the query, the script will exit with an error message.

The method also increments the global $WIKINDX_DB_QUERIES counter as used in the WIKINDX footer statement

Usage:
You are unlikely to use this method directly as it is called automatically from the following methods:
delete()
insert()
listFields()
select()
update()
updateNull()
updateSingle()

The one time you will use it will be after formatting a SQL SELECT string with selectNoExecute() should you wish to build up such a statement bit by bit.

WIKINDX home      WIKINDX usage      WIKINDX classes