php - Count non empty rows mysql

236

How to count non empty rows from 'naziv_operacije'? You can see table on the picture

Image

561

Answer

Solution:

If the rows are empty strings or null, the below should do it:

SELECT COUNT(*)
FROM `TEHN`
WHERE `naziv_operacije` IS NOT NULL OR `naziv_operacije` != '';
151

Answer

Solution:

Try this:

select count(column_name) from naziv_operacije;

Replace column_name with the column which should not be empty

People are also looking for solutions to the problem: php - Openssl_pkcs7_sign(): error opening file

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.