your SQL is not being parsed properly
you are missing the variable values..
it should read {not knowing what the values are supposed to be ive made them up}
I dont know how or why the query is failing but the example above might help you in debuggingCode:select * from fichas where tipo='50' and precio>='10' and precio<='20'