Is it possible to count the total number of fields in a table that are empty? If so, please let me know, I cant find anything in the manual.
a little help with a mysql query, please.
Collapse
X
-
yes.
select count(*) from table_name where field1 isNULL and field2 isNULL and ...;
or if the fields are empty as in (they were set empty by code):
select count(*) from table_name where field1 = '' and field2 = '' and ...;
i don't know of any built-in mysql function that will help, due to the fact of varying structure of tables.
peace-- "You can't stop ingenuity, trust me.."
-
Excellent! Thanks a million!yes.
select count(*) from table_name where field1 isNULL and field2 isNULL and ...;
or if the fields are empty as in (they were set empty by code):
select count(*) from table_name where field1 = '' and field2 = '' and ...;
i don't know of any built-in mysql function that will help, due to the fact of varying structure of tables.
peaceSig for sale. ICQ: 163-545-054Comment

Comment