0

I am using Red query builder as the query builder in my django application with MySQL database. I've successfully changed the query so that it runs in mysql console. I'm stuck with executing query containing 'LIKE' clause. In the query returned from red query builder, only the argument is returned but no '%' appended to argument. Im mysql, to execute LIKE clause it should be 'value%'. How can I modify the query from red query builder to run like clause? Or is there a way to append % to arguments in the python backend? Thanks in advance.

user12757
  • 39
  • 1
  • 9
  • I have a similar requirement - users are requesting a "contains" option in the UI, which I could implement with a LIKE query with % before and after the param - implementing this with RQB at the moment is pretty painful. – Scott Wilson Apr 08 '15 at 13:44

1 Answers1

0

I think it might need new feature related to: https://github.com/salk31/RedQueryBuilder/issues/15 Where you get a chance to fiddle with the arguments but also have the context (operator, field name etc)

So might be easier on the server at the moment.

Please raise feature requests, comment etc as appropriate.

salk31
  • 995
  • 2
  • 8
  • 13
  • I am using red query builder version 0.6.0. In this I am using date as the first field for filtering. By default current date is displayed. When I run the query, without changing the current value, this value is not passed into the database. What may be the problem? Also I would like to change the 'Please select' text in tables dropdown to 'Select table' and how can I change the font-family of the date picker used? – user12757 Mar 06 '14 at 05:53
  • Please could you raise an issue on https://github.com/salk31/RedQueryBuilder/issues?state=open for the date picker issue. At worst you could use javascript via the DOM to change the "please select" bit? Might be worth raising an issue for that? For the font family you could edit/replace the CSS provided or use something like !important to override (probably a more elegant way) – salk31 Mar 06 '14 at 20:57
  • I've raised the issue with the date field as: https://github.com/salk31/RedQueryBuilder/issues/19 and will fix ASAP. – salk31 Mar 09 '14 at 08:34