ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old February 23rd, 2000, 09:01 AM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
Help!!On how to code A-Z title search, PLEEEAASE!

<i><b>Originally posted by : Trinity (the_matrix_ad@hotmail.com)</b></i><br />To anyone out there, I really need some help for my school project, on how to code an <br />A-Z title link search.<br />For example: if the user clicks on C, it will take he/she to a page with all the movies starting<br />with the letter C.<br />I need to see what the SQL query would look like for this type of search.<br />My html file will have something like this...<br /><br /><b>View showtimes for movie titles that begin with:</b><br><br /> <a HREF="title_search.asp#A">A</a> <br /> <a HREF="title_search.asp#B">B</a> <br /> <a HREF="title_search.asp#C">C</a> <br /> .<br /> .<br /> .<br /> <a HREF="title_search.asp#Z">Z</a><br />I got this little code of some web site. I've just started learning ASP on the side, therefore I'm not <br />very familiar with it.<br />I do not understand why they're using the '#' in the HREF.<br />I have successfully built in a little ASP prototype that selects all the movie title from <br />my database. But the question is now, how to do this particular feature A-Z ????<br /><br />Thank you for taking your time to ready my humble help message.<br />I would reaaaally appreciate if anybody could help on this ASAP.<br /><br />Thaks again <br /><br />Trinity )<br />

Reply With Quote
  #2  
Old February 23rd, 2000, 09:55 PM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
<i><b>Originally posted by : Brian (brianjmoss@mindspring.com)</b></i><br /><br />Triniry,<br /><br />The number signs (#) you see are used to link to different parts of a HTML file by using the <A NAME> HTML command. For example, let's supposed you have a very long HTML page. If you don't want to require the viewer to have to scroll all the back to the top of the page, you would put the command <A NAME="top"> at the beginning of your HTML. Then at the bottom of your page, you would put the command, <A HREF="#top">Return to top</A>. When someone clicks on this link, it takes that person to the very top of the page. <br /><br />I think the sample code in question uses this technique because the information is truly dynamic (i.e. not contained in a database). The developer probably puts each each grouping of titles in its own section sorted by it's first letter.<br /><br />Let me suggest a different approach... Replace all of the #'s in your link code with the following: <br /><br />?letter= <br /><br />For example, instead of having:<br /><br /><a HREF="title_search.asp#C">C</a> <br /><br />you would have:<br /><br /><A HREF="title_search.asp?letter=C">C</A><br /><br />In the beginning of the title_search.asp page, test to see if letter exists (i.e. if request.querystring("letter") <> "" then...). If it does, grab the letter and assign it to a variable (i.e. Letter = request.querystring("letter") ). Then use the following SQL query (you will have to adapt it to fit your situation):<br /><br />SQL = "SELECT TITLE FROM MOVIES WHERE TITLE LIKE " & letter & "%"<br /><br />Finally open a recordset to your database using the above SQL query.<br /><br />------------<br />Trinity at 2/23/2000 7:01:02 AM<br /><br />To anyone out there, I really need some help for my school project, on how to code an <br />A-Z title link search.<br />For example: if the user clicks on C, it will take he/she to a page with all the movies starting<br />with the letter C.<br />I need to see what the SQL query would look like for this type of search.<br />My html file will have something like this...<br /><br /><b>View showtimes for movie titles that begin with:</b><br><br /> <a HREF="title_search.asp#A">A</a> <br /> <a HREF="title_search.asp#B">B</a> <br /> <a HREF="title_search.asp#C">C</a> <br /> .<br /> .<br /> .<br /> <a HREF="title_search.asp#Z">Z</a><br />I got this little code of some web site. I've just started learning ASP on the side, therefore I'm not <br />very familiar with it.<br />I do not understand why they're using the '#' in the HREF.<br />I have successfully built in a little ASP prototype that selects all the movie title from <br />my database. But the question is now, how to do this particular feature A-Z ????<br /><br />Thank you for taking your time to ready my humble help message.<br />I would reaaaally appreciate if anybody could help on this ASAP.<br /><br />Thaks again <br /><br />Trinity )<br />

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingASP Development > Help!!On how to code A-Z title search, PLEEEAASE!


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT