diff --git a/docs/setting_up.md b/docs/setting_up.md index 7d60ef0..101b33b 100644 --- a/docs/setting_up.md +++ b/docs/setting_up.md @@ -57,6 +57,7 @@ MariaDB [(none)]> FLUSH PRIVILEGES; The first command creates the empty database and sets the Character set to utf8. This is important at least when it comes to *fishbook*. The second row creates a user **foo** and grants that user all rights on all tables of **fish_book**. So far **foo** can only log in from the local machine. In order to grant access also from outsides you need to issue a second command: ```sql +MariaDB [(none)]> CREATE USER 'foo'@'%' identified by 'password'; MariaDB [(none)]> GRANT ALL ON fish_book.* TO 'foo'@'%' IDENTIFIED BY 'password'; MariaDB [(none)]> FLUSH PRIVILEGES; ``` diff --git a/fishbook/frontend/frontend_classes.py b/fishbook/frontend/frontend_classes.py index a4d881c..2c36d73 100644 --- a/fishbook/frontend/frontend_classes.py +++ b/fishbook/frontend/frontend_classes.py @@ -119,11 +119,11 @@ class Cell: """ cs = Cells * CellDatasetMap * Datasets * Subjects if cell_type: - cs = cs & "cell_type like '{0:s}'".format(cell_type) + cs = cs & "cell_type like '%{0:s}%'".format(cell_type) if species: cs = cs & "species like '%{0:s}%'".format(species) if quality: - cs = cs & "quality like '{0:s}'".format(quality) + cs = cs & "quality like '%{0:s}%'".format(quality) results = [] total = len(cs) if not test: