Jump to content

FULLTEXT Boolean mode - wildcards - Need Urgent Help


krembo99

Recommended Posts

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.

 

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

 

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 :

 

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

 

what would be the operator to Select ALL clients ??

 

I tried

 

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

 

But did not work...

 

How to use a wildcard WITHOUT appending it to a search term (ALL) ??

 

 

 

 

Thanks for replying , I was starting to think no one see this post !

 

I don't follow... why use a search if your search would simply find everything?

 

well, this is a part of a system that is generating graphs for an automated distributed warehouses chain

I have ONE graph, that a user can change parameters.

the parameters are : Country , City , Supplier ,product , Client, Warehouse.

the search is to populate the array to generate the graph.

 

So the user can generate a graph for example

 

Germany (-) berlin (-) supplierX (+) productY

 

This will generate a graph from germany, EXCLUDING teh city of berlin , EXCLUDING supplier X and INCLUDING ONLY product Y

 

The problem is :

how to make , with the same feature ,for example :

 

ALL COUNTRIES (-) productX (-)Supplier Y (+) ALL warehouses

 

I hope it is more clear ....

 

 

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.