• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

" " on search

riseup

New Member
I am newbie on PHP

I install php directory into mysite. I try to search using " " but the result is error

I got \"search\" not found

Please tell me how can I remove \" \" when I use " " to search

And sorry if there is any thread like these
 
Tq but when I search using "word" there is no result for "word"
If I search using word it work.....

I want people can search using " " like in yahoo, etc

So can you help me?
 
you may take into account this consideration:
if you are starting a search within a database, don't pass the quote without casting it and in the database itself, use "addslashes()" when inserting data (i assume you use PHP).

by this way, a search pattern: "word", would search for the word \"word\" in the database. if an occurance happens, replace \"word\" with "word" by using stripslashes and output the result.

it's worth noting that a search mechanism has to have capability in filtering junks (like single characters, punctuation, etc)
 
the idea is to detect " in the beginning and the end of the string. if " is detected your query will be WHERE column = "string", if no " is detected then your query will be WHERE column LIKE "string"
 
i dont know what you mean. do you mean i should have SELECT * FROM table and so on... ?
ofcourse you should already know that. what i was saying is an idea, and i assume the reader knows what to do.
 
Back
Top