I have a php page when get the values from $_GET variables and put this in a php query with two condition:
AND book_id = '$bookid"
AND book_date between coalesce('$bookdate',book_date) AND coalesce('$bookdate',book_date)
The problem is this condition: AND book_date between coalesce('$bookdate',book_date) AND coalesce('$bookdate',book_date)
To work, the query want '$bookdate' = null, and when retrieve the variables, set the value as a string.
How to make this?
Thanks