Query Date()
Query Date()

Hi guys I have a problem I have two datetime that I have to check to use POST so to load the data in the table only which have different times and the request to format Datetime in Date I can't do it serverside, can you help me the query is the following how should I write it in Editor?
SELECT * from scrivania WHERE
Date(scarico_bo) = "2020-10-15" and Date(delivery) = "2020-10-15"
OR
Date(delivery) = "2020-10-15"
OR
Date(scarico_bo) = "2020-10-15"
in the Editor manual i did not find anything to do formatting from DATE to DATETIME in clientside
This discussion has been closed.
Answers
According to my limited knowledge of Boolean algebra this:
can be written like this:
The logical AND is evaluated before all of the ORs. Hence it is like putting a bracket around this
It is sufficient for the WHERE clause to return true if either "scarico_bo" is "2020-10-15" or "delivery". It is irrelevant whether both equal "2020-10-15".
But anyway ... I took a look at the more complex WHERE clause and wrote it in Editor syntax below.
if you take a look at this in the docs https://editor.datatables.net/manual/php/conditions#Complex-usage
you should find what you need:
The WHERE clause could look something like this: