Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ColdFusion / Advanced Techniques / July 2007



Tip: Looking for answers? Try searching our database.

search by surname

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JohnGree - 27 Jul 2007 11:29 GMT
<cfquery name="get_names" datasource="#application.ds#">
SELECT *
FROM customerenquiryaddresses
<CFIF isdefined ("form.Surname")>
WHERE
    EqSurname LIKE <cfqueryparam cfsqltype="cf_sql_varchar"
value="#form.Surname#%">
</CFIF>
ORDER BY EqSurname
LIMIT #start_record#, #records_per_page#
</cfquery>

<cfquery name="get_names" datasource="#application.ds#">
SELECT *
FROM customerenquiryaddresses
<CFIF isdefined ("form.Surname")>
WHERE
    EqSurname LIKE <cfqueryparam cfsqltype="cf_sql_varchar"
value="#form.Surname#%">
</CFIF>
ORDER BY EqSurname
LIMIT #start_record#, #records_per_page#
</cfquery>
Prabhu S - 27 Jul 2007 12:40 GMT
Hi John, What the issue?:cool;
JohnGree - 27 Jul 2007 12:48 GMT
hi yes soory i did post it i thought?

i have a results page which shows 1 record with all that persons information
like firstname, surname etc, on the same page there is a next and previous
button to navigate through each record and search by surname text box, when
this is submited i need to move to the first recoed that matches the text box,
so then i can still use the next and previous buttons to navigate through.

the next and previous btns work, the surname search is not as i am not sure
how to do it?
i have played around with verity but stil cant get it to work?
so really what i need to do is get all the records order them by surname then
give each of them a id number

so Abbot = 1, Adcock= 2 etc

then i should be able to use the next and previous to go through them?
i am just not sure how i can do this?
hope you can usnderstand what i am trying to do.

many thanks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.