I hope this is alright to post here.
I need some advice on how to do a certain Select on my MySQL database.
I want to do a keyword search on one table then have the results ordered by how many keywords were found. So if three keywords are entered, records with 3 found are listed first and records with less than 3 are listed below them.
I thought about doing two SELECT statements. One using an AND (field like "%keyword1%" && field like "%keyword2%") then do another SELECT using an OR (field like "%keyword1%" | | field like "%keyword2%"). The problem with this is that the OR finds the same records as the AND and I would prefer not to have duplicates.
This is probably not a hard problem to solve but I don't have much experience above the basic SQL statements.
Thanks
------------------
I Truly Appreciate Any Help!
Jaymes H. Sorbel
The ChrisLand Company
www.chrislands.com
info@chrislands.com
"Honor and Integrity is a way of life!"
I need some advice on how to do a certain Select on my MySQL database.
I want to do a keyword search on one table then have the results ordered by how many keywords were found. So if three keywords are entered, records with 3 found are listed first and records with less than 3 are listed below them.
I thought about doing two SELECT statements. One using an AND (field like "%keyword1%" && field like "%keyword2%") then do another SELECT using an OR (field like "%keyword1%" | | field like "%keyword2%"). The problem with this is that the OR finds the same records as the AND and I would prefer not to have duplicates.
This is probably not a hard problem to solve but I don't have much experience above the basic SQL statements.
Thanks
------------------
I Truly Appreciate Any Help!
Jaymes H. Sorbel
The ChrisLand Company
www.chrislands.com
info@chrislands.com
"Honor and Integrity is a way of life!"