|
| |
|
|
rlapointe
Posts: 3 Joined: 1/12/2007 Status: offline
|
Search multiple fields with single query - 1/15/2007 3:19:21
Is there a FrontPage/ASP guru out there that can help me sort my database results page out? Here is the link: http://www.pjsinnam.com/Database1_interface/SARList/results_page.asp My problem is on the “Search Results Page.” Presently there are 13 search forms on the page. I want to reduce 8 of these search forms into a single query; and, leave the first five search forms as displayed. I have never published a database on a website prior to this. I am a novice with MS Access, I have no training in SQL, but would characterize my FrontPage experience as an intermediate to advanced user. I can work in HTML. The db identifies Vietnam War USAF search and rescue aircrews, who they rescued, and many details of each mission. There are 2576 records in the db. Each record is a specific rescue mission. Each record has 27 fields. Of those, 8 fields are used to identify participants by their crew position. The other 19 fields fields provide details of the mission. The goal is to type the last name of any participant into a single search form, the query then searches all of the name fields and displays all records that “contain” the inputted name. The first 6 search forms work fine and I want to leave on the results page. The 8 search forms for names presently work only if searched using only one name at a time, leaving the other 7 “name” search blocks empty. If you put the name into more than one search form, the database comes back with “No records returned” even if there are actually records with that name in them. The database is a single table named SARList Fields with names inputted by LastName, FirstName, MI. Searches are done using the last name. I used the “contains” criteria on all fields with names to optimize results. I have spent several weeks looking through Outfront Forums. I was able to get the database to work by using information in the forums, especially useful were many threads by “Spooky.” I’ve concluded that I need some SQL code and instructions on where to imput it into the HTML view of the FrontPage “Search Result Page. Thanks in advance for any help provided. This is my first entry into any Outfront forum. The below table shows the field names and their data type. Fields that have search forms on the “Search Results Page” have an asterisk. Fields that contain names are italicized . ID Text SARName Text ACType Text * ACserial Text Downed Date/Time short date format * Rescue Date/Time short date format * SARunit Text * SARac Text * Area Text * LatLong Text PJ1 Text * PJ2 Text * PJ3 Text * Pilot Text * CoPilot Text * FE Text * SurvivorA Text * SurvivorB Text * H2O Yes/No Check Box H2OL Yes/No Check Box PJOut Yes/No Check Box Med Yes/No Check Box Night Yes/No Check Box Hoist Yes/No Check Box Saves Text Type Text Notes Text
|
|
|
|
rdouglass
Posts: 9280 From: Biddeford, ME USA Status: offline
|
RE: Search multiple fields with single query - 1/15/2007 10:28:42
Hi and Welcome to Outfront This is a relatively popular question and has been done many times as well as been answered many times. Have you tried searching this ASP forum? If you try a few searches and have still not found your answer, re-post and I'd be glad to help.
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
|
|
rlapointe
Posts: 3 Joined: 1/12/2007 Status: offline
|
RE: Search multiple fields with single query - 1/15/2007 11:00:34
Actually, I have spent weeks looking at different threads on this subject and none of them answered how to do this. Many explained how to do ONE search form to query more than one fields. But those answers did not take into account that I need to keep the non=name search forms on the results page. What may be obvious to you, is not obvious to those of us who do not "speak" SQL. I really could use some help here. It took me months just to get the database to work at all on my site. I am not stupid, but I am unable to solve problems when I do not even know what is causing them. I've read enough threads on this subject to believe that the solution is a custom query. I've tried more than 20 custom queries on my own and everyone caused the db to crash. Anyone out there want to try and educate me?
|
|
|
|
rdouglass
Posts: 9280 From: Biddeford, ME USA Status: offline
|
RE: Search multiple fields with single query - 1/15/2007 11:14:37
I apologize; I did not mean to insult you but many 'first-time posters' don't use the search form. And please don't be offended because *everyone* here does this on a volunteer basis and all try to help in any way they can. Are you using the DRW? Essentially to search multiple fields using the same text field as input criteria, your custom query could look something like this: SELECT * FROM myTable WHERE (myFirstDBField LIKE '%::myTextBoxName::%') OR (mySecondDBField LIKE '%::myTextBoxName::%') OR (myThirdDBField LIKE '%::myTextBoxName::%') ... Does that help any? If not, maybe you can opst some of the code you're using now.
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
|
|
rlapointe
Posts: 3 Joined: 1/12/2007 Status: offline
|
RE: Search multiple fields with single query - 1/15/2007 19:11:16
No real offense taken. Just wanted to express that I had made a real effort to figure this out before I asked for help. After work today I will try the code that you suggested. Thanks for the help. I will let you know if that did it.
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|