fulltext doesn´t work for integer?

M

Mark Toth

I have used the following code:

a1 = "+"
a2 = "*"
@searchstring = params[:searching].gsub(" ", "* +")
@results = Product.find_by_sql("SELECT * FROM products WHERE MATCH
(name,sku) AGAINST ('"+a1+@searchstring+a2+"' IN BOOLEAN MODE) order by
name desc LIMIT 0,50;")

It works, BUT not for numbers. Any idea why it coesn´t work for numbers?
If I have example: "this is 34" in the database. It works fine "this
is", but as soon as I enter the "34" it shows no results.

Thanks,

Mark
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top