Subscribe to DataMgr |
Visit this group |
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.
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).
To find out what SQL DataMgr would use for a database update, simply call the updateRecordsSQL with the same arguments as the updateRecords method.
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).
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).
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).
These methods are especially useful with CF_DMQuery