Jump to content

Help..... SQL query string problem


omalic

Recommended Posts

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?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.