|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Multi tier/field search
Ok what im tring to do here is build a complex search for a forums database. Basically before you can post your required to select a year, make and model of car. Then you select a Vehicle system, Main Category, Subcategorey and Subcategory1. Then you are allowed to make a post. I am running a MS Access database with a OBDC driver through Cold Fusion Server.
What is going to happen is once the post has been written before it displays your message back to you it will search the database for simalar entries. Where I think it gets tricky is that it cant match everything 100% if you know what i mean, and what i would like is a percentage or nuber of fields to be displayed. So it would say (5 out of 7 fields matched or 70% match) and display those results in a list. Now I have got the database up and can post with the year make model etc. but cant figure out this search, all i have been able to acomplish is a search with 100% results where if one thing doesnt match nothing shows up. |
|
#2
|
|||
|
|||
|
Try using OR in your WHERE clause, instead of AND to get results that have any or all of the criteria. And look into using COUNT() in the SELECT clause (and a GROUP BY clause at the end) to get a count of records returned. And I'd advise grabbing a good book on SQL because problems like this will confront you again and again, and the only real solution is a firm grasp of SQL.
|
|
#3
|
|||
|
|||
|
I think im going to try this extension, I have a few books on SQL but Im still learning. Thanks for the advice.
URL |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > Multi tier/field search |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|