I need to create a pdf but with specific information
There is data that has a field in the database that is called Enabled, that field handles 2 data 1 for when it is active and 0 when it is inactive, what I need is that the pdf only shows the data that is enabled 1, since try putting in if the query but it doesn’t work for me, it doesn’t show me the correct data it shows everything that is stored in the DB
Hello
I have several data in a table in Mysql that have a field called enabled, that field handles 2 numbers, 0 when it is disabled and 1 when it is enabled, I have a foreach that shows me the data that is linked to the foreign key ejm:
the main table is called accidents, the other table is called methods, methods have a foreign key to accidents, the foreach that I have in the pdf is that it shows me all the methods that have the same id as this in accidents, what I need is that if the method has enabled 0, it will not show it and only show those that have enabled 1
but at the moment of showing it only shows me the message that is in the if, it does not show me the data that has 1 as enabled and in the database I have 2 records with enabled 1
Hello
I already implemented the If but it doesn’t show me anything in that part neither the message of the If nor the information that it has enabled in 1
no, it is being evaluated true, the condition must be that if there is any value for the accident id in enabled 1, it should show only that data, regardless of the fact that they find more data with the same accident id but in enabled 0