Skip to content

I cannot make a query with "where ..... like....." #2

Description

@vasi26ro

Hello,

Your library is awesome thank you for sharing it.

I'm trying to read some data from a table

db.query('select * where category like \"WATER\"')

and I receive this error:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\site-packages\dbf\__init__.py", line 5962, in query
return pql(self, criteria)
File "C:\Python27\lib\site-packages\dbf\__init__.py", line 8183, in pql
condition = pql_criteria(records, condition)
File "C:\Python27\lib\site-packages\dbf\__init__.py", line 8128, in pql_criteria
execute(function, g)
File "<string>", line 5, in execute
File "<string>", line 8
if categoria like "WATER":
^
`SyntaxError: invalid syntax``

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions