krembo99 Posted January 9, 2010 Share Posted January 9, 2010 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) ?? Quote Link to comment https://forums.phpfreaks.com/topic/187793-fulltext-boolean-mode-wildcards-need-urgent-help/ Share on other sites More sharing options...
fenway Posted January 13, 2010 Share Posted January 13, 2010 I don't follow... why use a search if your search would simply find everything? Quote Link to comment https://forums.phpfreaks.com/topic/187793-fulltext-boolean-mode-wildcards-need-urgent-help/#findComment-994366 Share on other sites More sharing options...
krembo99 Posted January 20, 2010 Author Share Posted January 20, 2010 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 .... Quote Link to comment https://forums.phpfreaks.com/topic/187793-fulltext-boolean-mode-wildcards-need-urgent-help/#findComment-998702 Share on other sites More sharing options...
fenway Posted January 20, 2010 Share Posted January 20, 2010 It sounds like you need to determine if the user has specified the criteria or not Quote Link to comment https://forums.phpfreaks.com/topic/187793-fulltext-boolean-mode-wildcards-need-urgent-help/#findComment-998994 Share on other sites More sharing options...
krembo99 Posted January 21, 2010 Author Share Posted January 21, 2010 I have him determined the criteria .... But this is exactly my question, I can determine the "+" the "-" and also the "|" (or) , but can not find how to determine "ALL" .. Quote Link to comment https://forums.phpfreaks.com/topic/187793-fulltext-boolean-mode-wildcards-need-urgent-help/#findComment-999234 Share on other sites More sharing options...
fenway Posted January 21, 2010 Share Posted January 21, 2010 Maybe I'm not being clear... ALL mean "no criteria" -- there is nothing to determine. Quote Link to comment https://forums.phpfreaks.com/topic/187793-fulltext-boolean-mode-wildcards-need-urgent-help/#findComment-999532 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.