FullText Boolean MYSQL Search with Wildcard Problem
-
Well.. I am developing a very complex plugin for wordpress, and I have a MYSQL Specific question..
(I did not know where on this forum exactly to post it.. Hope this section is the right place ..Hello all..
I am using a FULLTEXT search on my database (yes, I know it is slow..) , creating a user defined filters , and later plotting a graph..
A user can choose between country, product, warehouse, customer, and any boolean combination of the above to plot a statistics graph.[code]SELECT client_name,count(client_name) as unit,sum(pic_sale_price) as gross FROM mgminibar_reports_view where MATCH (client_name) AGAINST ('Client_name' IN BOOLEAN MODE) group by client_name[/code]
example:
plot graph for Germany , all Warehouses (MINUS) WarehouseX + US (minus) Florida – CustomerY..It works ok, but I have one problem…
I can not find the way to make (Select All) .
(Or in other words, Using a wildcard without appending a string to it )For example , Germany, ALL Clients,
or
All COUNTRIES , ALL PRODUCTS.
I could not find anything in the reference ..
in the code here below :
[code]SELECT client_name,count(client_name) as unit,sum(pic_sale_price) as gross FROM mgminibar_reports_view where MATCH (client_name) AGAINST ('Client_name' IN BOOLEAN MODE) group by client_name[/code]
what would be the operator to Select ALL clients ??
I tried
[code]SELECT client_name,count(client_name) as unit,sum(pic_sale_price) as gross FROM mgminibar_reports_view where MATCH (client_name) AGAINST ('+*' IN BOOLEAN MODE) group by client_name[/code]
But did not work…
How to use a wildcard WITHOUT appending it to a search term (ALL) ??
- The topic ‘FullText Boolean MYSQL Search with Wildcard Problem’ is closed to new replies.