spaceman12 Posted January 5, 2011 Share Posted January 5, 2011 Sombody please help me and tell me a way as how to count only non-empty cells in a column contained in a table of a database. Thank you Link to comment https://forums.phpfreaks.com/topic/223484-count-non-empty-cells-in-a-column/ Share on other sites More sharing options...
BlueSkyIS Posted January 5, 2011 Share Posted January 5, 2011 SELECT COUNT(*) FROM `some_table` WHERE some_column IS NOT NULL AND some_column != '' Link to comment https://forums.phpfreaks.com/topic/223484-count-non-empty-cells-in-a-column/#findComment-1155235 Share on other sites More sharing options...
spaceman12 Posted January 5, 2011 Author Share Posted January 5, 2011 it still returns me the total number of rows and not only those that are not empty Link to comment https://forums.phpfreaks.com/topic/223484-count-non-empty-cells-in-a-column/#findComment-1155237 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.