list paging error.
Hello, I am trying to create record set that lists seven records per page which it does. I have created previous and next links and they display but when I click on the next link I get an error message . . . Variable ID is undefined. ID is the field that query sorts by and I do not see why it is undefined. Please see code - thanks-jim
<cfquery name="results" datasource="WebDataSource">
SELECT ID, Product, Description, County
FROM Feedback
Where 0=0
AND ID LIKE '%#ID#%'
AND Product LIKE '%#Product#%'
AND Description Like '%#Description#%'
and County like '%#County#%'
Order by ID
</CFQUERY>
<cfparam name="url.startrow" default="1"/>
<cfset nNextStartRow = URL.startrow + 7 />
<cfset nPreviousStartRow= URL.startrow - 7 />
<cfoutput> <h3>Returned #results.recordcount# reports submitted</h3> </cfoutput>
<cfoutput><table summary="County user feedback reports"
<cfif nPreviousStartRow GTE 1>
<a href="#CGI.SCRIPT_NAME#?startrow=#nPreviousStartRow#">Previous</a>
</cfif></td>
<td><a href="#CGI.SCRIPT_NAME#?startrow=#nNextStartRow#">Next</a></td>
</tr>
</cfoutput
<CFOUTPUT Query="results" startrow="#url.startrow#" maxrows="7">
<tr>
<th width="10%" scope="col">ReportID:</th>
<th width="12%" scope="col">County:</th>
<th width="12%" scope="col">Product:</th>
<!---<th width="66%" scope="col">Description:</th>--->
</tr>
<tr>
<td>#id#</td>
<td>#county#</td>
<td>#product#</td>
<!---' <td>#description#</td>--->
</tr>
<tr >
<td bgcolor="##FFFFCC" colspan="3"><strong>Description:</strong> #description#</td></tr>
</cfoutput></table>
