omalic Posted October 26, 2009 Share Posted October 26, 2009 Hello all, I am working on a search engine using the above platform however, I have come across a problem that I've failed to resolve. Given a table with infor... I want to do a search such as: "C#", "c++", "word++", "word--", "word&", "@word "word++", "#word", "++word", "&&word" etc on title or description that match the exact word. The SQL statement I am using is given below. SELECT Distinct a.ID, a.Title, a.Description ,a.DateCreated, FROM `table` AS a WHERE ucase(a.Title) REGEXP ucase(@Search) or ucase(description) REGEXP ucase(@Search); These search strings are passed to my storeproc without any issues however, the result produced by the above does not match the search string. Where am I going wrong? Quote Link to comment https://forums.phpfreaks.com/topic/179092-help-sql-query-string-problem/ Share on other sites More sharing options...
misheck Posted October 26, 2009 Share Posted October 26, 2009 Hi have you tried having variables for the queries described before you use them in the mysql query? I would attempt that first. Can you post a code so I can have a look at it. Quote Link to comment https://forums.phpfreaks.com/topic/179092-help-sql-query-string-problem/#findComment-944959 Share on other sites More sharing options...
fenway Posted October 31, 2009 Share Posted October 31, 2009 Don't post the code -- show us the actual queries. Quote Link to comment https://forums.phpfreaks.com/topic/179092-help-sql-query-string-problem/#findComment-948395 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.