You're not passing your variables.
<cfif IsDefined("DUE")>
<cfset qryvar = "DUE" />
<cfelseif isdefined("PASTDUE")>
<cfset qryvar = "PASTDUE" />
....
<A HREF="loaddataSummaryResults.cfm?StartRow=#Next#&qryvar=#qryvar#">
On 5/20/05, WebStop Internet Services wrote:
> Help! This keeps failing after the first 25 records are displayed and it
> shows all records in the database 25 at a time not just the ones queried
> originally by say company_name. Anyone know why?
>
> <cfset todayDate = Now()>
> <!--- query the EmployeeDirectory table. Cache the result set for 15
> minutes. --->
> <CFPARAM NAME="StartRow" DEFAULT="1">
> <CFPARAM NAME="DisplayRows" DEFAULT="25">
>
> <cfquery name="getCompanyData"
> datasource="LOADDATA">
> SELECT
> company_name,
> container_no,
> billdate,LOADDATA.ID,
> SUM(("IN" - out) * rate) AS total_rate,
> SUM("IN" - out) AS OnHand
> FROM
> rate_calc
> <cfif IsDefined("DUE")>WHERE BILLDATE > '#DateFormat(todayDate,
> "mm/dd/yy")#'
> <cfelseif isdefined("PASTDUE")>WHERE BILLDATE < '#DateFormat(todayDate,
> "mm/dd/yy")#'
> <cfelseif isdefined("TODAY")>WHERE BILLDATE = '#DateFormat(todayDate,
> "mm/dd/yy")#'
> <cfelseif isdefined("FORM.COMPANY_NAME")>WHERE COMPANY_NAME =
> '#company_name#'
> <cfelseif isdefined("FORM.CONTAINER_NO")>WHERE CONTAINER_NO =
> '#container_no#'
> </cfif>
> GROUP BY
> company_name,
> container_no,
> billdate, LOADDATA.ID
> ORDER BY company_name, CONTAINER_NO, BILLDATE
>
> </cfquery>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting hours spent on a project or with a
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:207600
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54