I have a website where the client is able to search through a database of BOOKS and recommend those books to their clients. I have a search engine set up that allows them to search based on a number of parameters - age of the children, author, so so on.
I have a new field in the database for the Dewey Decimal System. it's a single field, but I would like my client to be able to search based on a RANGE (13.1 - 13.5 and so on)
I have successfully queried the database using just ONE field as follows:
THere are other fields in the search engine that are using ranges, and I have tried to mimic that code but I am getting errors - mainly because there is a different table being queried, but here is an example:
Msg#: 4562171 posted 6:20 pm on Jun 5, 2013 (gmt 0)
This is a tough one to assist with mainly because your code is building the query using functions and logic here, but if I understand the logic correctly you will need to add an AND to your $where statement when you build in the new range. If you haven't already resolved this (realizing it is an older thread), can you dump the sql statement out to see the syntax and perhaps discover why it is failing?