navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

Match() Against() SQL wont accept "" for a phrase

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> Match() Against() SQL wont accept "" for a phrase
Page: [1]
 
teimky

 

Posts: 77
Joined: 11/6/2006
Status: offline

 
Match() Against() SQL wont accept "" for a ph... - 4/30/2007 11:08:33   
Hi,

For all you MySQL experts on here may I ask why my match() - against() statement wont let me put double quotes in to make it a phrase match?

Whilst the statement below works it searches for each word individually if a user searches for more than 1 word..

WHERE MATCH(book_title) AGAINST('" & request.form("BOOK_TITLEP")&"'IN BOOLEAN MODE)"

(Therefore a search for "Amber Spyglass" would return
Child in Amber,
Amber Spyglass,
Silver Spyglass)

I want it to only return "Amber Spyglass"
The MySQL manual says to put "" around the against part to treat it as a phrase but this errors:

WHERE MATCH(book_title) AGAINST('" "& request.form("BOOK_TITLEP")&""'IN BOOLEAN MODE)"
I guess it doesnt like two sets of " next to each other?
Any ideas?


Thanks,

Mark.
Spooky

 

Posts: 26606
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: Match() Against() SQL wont accept "" for ... - 5/1/2007 12:02:40   
Partially its an asp problem as you arent passing the correct value (double quotes are needed).
Try it this way and see if it works for you?

WHERE MATCH(book_title) AGAINST('"""& request.form("BOOK_TITLEP")&"""' IN BOOLEAN MODE)"

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to teimky)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> Match() Against() SQL wont accept "" for a phrase
Page: [1]
Jump to: 1





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