DataMgr 2.5 Documentation: Get Records

Get Records

You can also use DataMgr to retrieve records from a table. Using only basic functionality, this gives you fast development but sacrifices power that you will likely need. As you will see in advanced functionality, however, DataMgr record retrieval can provide substantial power as well.

The getRecords method of DataMgr takes a structure, just like the previous methods mentioned. The method will only return records where the values in the fields match the values given in the structure. DataMgr does not ignore blank fields, so be certain to delete those keys from the structure if you don't want DataMgr to filter for NULL values.

Arguments:

Example:

<cfset qEmployees = Application.DataMgr.getRecords("employees",data)>

You can use the getRecord method instead if you want DataMgr to ensure that it only retrieves one record (it will throw an error if all primary keys are not provided).

Note that DataMgr will not attempt to filter by any cf_sql_longvarchar or cf_sql_clob fields.