As our introduction into Gateway objects, we will create an object that will allow us to query our database table of users to retrieve a large query of all records stored, as well as methods that will allow us to search or 'filter' the data to return specific records based upon criteria, suitable for a search interface.
Firstly, let's create a new ColdFusion template file and save it with the name
listUsers.cfm. This page will form part of our user management application, and will list all Users currently stored within the database.
Let's add the following code into the
<cfquery name="qlistUsers" datasource="CFOOP" username="<username>" password="<password>"> SELECT ID, firstName, lastName, username, ...