This is closer to the way it should be written, not sure what all those
variables contain, so I can't really answer your question.

<!--- our search parm --->
<CFIF IsDefined("url.search")>
        <CFSET search = url.search>
</CFIF>

<cfquery name="ClientList_Query" dbtype="query"> 
        SELECT 
                * 
        FROM 
                ClientList_Query1 

        <CFIF search neq "0"> 
                WHERE ClientName LIKE '%<cfqueryparam
cfsqltype="CF_SQL_VARCHAR" value="#search#">%'
        </cfif>
        
        ORDER BY #DefOrder# #URL.OrderByType#
</cfquery>


<cfif PageNum_ClientList_Query LT TotalPages_ClientList_Query> 
        <cfset myUrl = currentPage & "pageNum_clientList_query=">
        <cfset myURL = myURL &
Min(IncrementValue(PageNum_ClientList_Query),TotalPages_ClientList_Query)>

        <cfif isDefined("url.search")>
                <cfset myURL = myURL & "search=" & search>
        </cfif>
        <a href="#myURL#">
                Next
        </a>
</cfif>

> -----Original Message-----
> From: Paul Ihrig [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, August 08, 2006 11:34 AM
> To: CF-Community
> Subject: ot: quick url var q
> 
> ok i keep having a new search=whatever added to the url string when i hit
> next.
> i only need it added once.
> 
> so url string ends up lookin like
> http://blagh/blagh/ClientList.cfm?PageNum_ClientList_Query=3&search=Johnso
> n&search=Johnson
> when it should only be
> http://blagh/blagh/ClientList.cfm?PageNum_ClientList_Query=3&search=Johnso
> n
> 
> i am out of parctice
> any help would be swell
> thanks
> -paul
> 
> 
> <!--- our seaarch parm --->
> <CFIF IsDefined("search")>
> <CFSET search = search>
> <cfelse>
> <CFSET search = 0>
> </CFIF>
> 
> <cfquery name="ClientList_Query" dbtype="query">
> SELECT *
> FROM ClientList_Query1
> <CFIF #search# neq "0">
> WHERE
> ClientName LIKE '%#search#%'
> </cfif>
> ORDER BY #DefOrder# #URL.OrderByType#
> </cfquery>
> 
> 
> <cfif PageNum_ClientList_Query LT TotalPages_ClientList_Query>
> <a
> href="#CurrentPage#?PageNum_ClientList_Query=#Min(IncrementValue(PageNum_C
> lientList_Query),TotalPages_ClientList_Query)##QueryString_ClientList_Quer
> y#
> <cfif search EQ "0"><cfelse>&search=#search#</cfif>">Next</a>
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Community/message.cfm/messageid:212810
Subscription: http://www.houseoffusion.com/groups/CF-Community/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.5

Reply via email to