0
Hello. I have a PHP system with Mysql from a truck fleet company. In this system each user performs a Checklist of the vehicle before using it. This Checklist is registered in a table in the database. My client is asking for a Hecklist query screen that was not performed. Example: it informs the date period and the system returns checklists that were not made in that period.
How will I return a query for something that is not registered in the bank?
Thank you for the reply Silva Júnior. Yes, I have a table with all vehicles and table with drivers, they are with foreign key to Checklist table. In the table of Checklist also has date of realization. The question is as follows: there is no schedule for the completion of the Checklist and no specific date, any driver can take the vehicle when and where you want.
– EltonRodrigo
For example, you can search for the date in the Checklist table. Suppose the report is monthly, see how many checklists were made and subtract from 30 or 31, depending on the month. In this case, you would use the SQL COUNT function.
– Silva Júnior
You can use your code based on this post; <https://answall.com/questions/322203/selectr-datas-que-n%C3%A3o-est%C3%A3o-na-tabela>
– Silva Júnior
It worked! I linked the fleets table with the Checklist table using the left Join as shown in this link of this post you gave me. I had to add a "realized" column of the boolean type and in Select I used the clause WHERE with value "is null". Thank you very much.
– EltonRodrigo