Best Method - check if all fields in a Record are not null or empty
I have a record from a MySQL Database that needs to be validated to see if all the fields have any value or return some alert.
Is the best way to put all the field values into an array and then check the SUM where IS NOT NULL or Empty to see if it matches the qty of selected fields?
EXAMPLE: $result = | Value | NULL | NULL | Value | EMPTY |
In this example the Record has values from 5 Fields and 2 of those Fields are not Null or Empty
I need Validate to see when all 5 Fields have some value.
So it is a specific Record not the whole RecordSet and the goal is to see if all the fields have a value Or do Something.