Forums
This topic is locked
searching...
Posted 21 Jan 2005 19:30:59
1
has voted
21 Jan 2005 19:30:59 Matt Millican posted:
Hi all,I'm working on a site, where the user needs to be able to search a memo field where the text is stored in a DB. I need to know the best way to write the SQL string so you can use AND operators and such. Here is my current SQL:
<font face='Courier New'>"SELECT * FROM tblTable1 WHERE entryMemo LIKE '%" & request.form("search" & "%' ORDER BY entryDate DESC"</font id='Courier New'>
The user wants to be able to narrow search results by using operators such as AND and others that you would use on a search engine. Any help you can give me would be great.
If you need more info as to what I'm trying to accomplish, please let me know.
Thanks
Matt
Matt Millican
InternetMill.com
www.internetmill.com
(Win XP Pro / DWMX / Access XP / ASP / VBscript / PHP / MySQL)
Replies
Replied 21 Jan 2005 20:21:30
21 Jan 2005 20:21:30 Chris Charlton replied:
I might be over complicating, but I think you will need to generate a dynamic SQL string that's your custom WHERE clause(s).
Here's some DMXzone links you might want to look over:
<ul>
<li><b>Advanced Search Technology with SQL WhereStrings</b> - www.dmxzone.com/showDetail.asp?TypeId=2&NewsId=1177</li>
<li><b>Multiple paramater ASP - Access Database search</b> - www.dmxzone.com/showDetail.asp?TypeId=2&NewsId=6572</li>
<li><b>Building a simple database search feature</b> - www.dmxzone.com/showDetail.asp?TypeId=2&NewsId=297</li>
<li><b>Advanced Search VB or JS Scripter</b> (extension request) - www.dmxzone.com/showDetail.asp?TypeId=26&NewsId=4271</li></ul>
Read each one, and even Google around for a bit to get some solid leads. <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
Here's some DMXzone links you might want to look over:
<ul>
<li><b>Advanced Search Technology with SQL WhereStrings</b> - www.dmxzone.com/showDetail.asp?TypeId=2&NewsId=1177</li>
<li><b>Multiple paramater ASP - Access Database search</b> - www.dmxzone.com/showDetail.asp?TypeId=2&NewsId=6572</li>
<li><b>Building a simple database search feature</b> - www.dmxzone.com/showDetail.asp?TypeId=2&NewsId=297</li>
<li><b>Advanced Search VB or JS Scripter</b> (extension request) - www.dmxzone.com/showDetail.asp?TypeId=26&NewsId=4271</li></ul>
Read each one, and even Google around for a bit to get some solid leads. <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
Replied 22 Jan 2005 18:47:31
22 Jan 2005 18:47:31 Matt Millican replied:
Thanks for the pointers. These are the times when I wish I didn't switch to hand coding everything and still used DWs behaviors. lol... I think google has proved useful yet again as I found a few articles late last night that I just have to read through.
Thanks again
Matt Millican
InternetMill.com
www.internetmill.com
(Win XP Pro / DWMX / Access XP / ASP / VBscript / PHP / MySQL)
Edited by - InternetMill on 22 Jan 2005 18:48:02
Thanks again
Matt Millican
InternetMill.com
www.internetmill.com
(Win XP Pro / DWMX / Access XP / ASP / VBscript / PHP / MySQL)
Edited by - InternetMill on 22 Jan 2005 18:48:02