We set the default value so that the page does not fail if there is no value passed in for the
id variable. We added the singular
getProduct variable. The only difference is that this will return a single record after the CFC is modified. At present, CFC does not handle the argument,
where, even though it is a part of the method. We have to build in the functionality. Change the highlighted lines to make this method work correctly. Since we are not adding the query type to the
<cfoutput> tag, it will not loop through the query. It will only return the first record in the recordset. In this instance, there is only one record that will be same. Thus the following code displays only one row on our webpage:
<cfquery datasource="cfb" ...