DataMgr 2.5 Documentation: Get Methods SQL

Get Methods SQL

Get Records

DataMgr provides the ability to see what SQL array it will use for the "getRecords" (or "getRecord") method. To get this information, simply call the "getRecordsSQL" method with the same arguments that you would pass to the "getRecords" method.

Insert Records

To find out what SQL DataMgr would use for a database insert, simply call the insertRecordsSQL. Do note, however, that the "data" argument is currently named "data_set" in insertRecordsSQL (this may change in a future build).

Update Records

To find out what SQL DataMgr would use for a database update, simply call the updateRecordsSQL with the same arguments as the updateRecords method.


getSelectSQL

The "getSelectSQL" method is used internally by "getRecords" (through "getRecordsSQL") and takes the same arguments as those methods. It returns the SQL (SQL array) for the SELECT clause of the query (not including the "SELECT" keyword).

getFromSQL

The "getFromSQL" method is used internally by "getRecords" (through "getRecordsSQL") and takes the same arguments as those methods. It returns the SQL (SQL array) for the FROM clause of the query (including any joins, but not the "FROM" keyword).

getWhereSQL

The "getWhereSQL" method is used by several methods internally - including "getRecords" (through "getRecordsSQL") and "updateRecord" (through "updateRecordsSQL") and "deleteRecord". It returns the SQL (SQL array) for the WHERE clause of the query (including any joins, but not the "WHERE" keyword).

CF_DMQuery / CF_DMSQL

These methods are especially useful with CF_DMQuery