Count entries in a database activity

Count entries in a database activity

by Gain Oloya -
Number of replies: 5

Is there a way to count the number of entries in a database activity?

Average of ratings: -
In reply to Gain Oloya

Re: Count entries in a database activity

by William Lu -
Picture of Particularly helpful Moodlers

The entry number is shown in 'View Single' tab.

Average of ratings: Useful (1)
In reply to William Lu

Re: Count entries in a database activity

by Mela Sogono -

Hi all,

I may be missing something, but when I click on "View List" I don't get the number of entries anywhere.

I'm on Moodle 3.3 -- was this feature removed perhaps? :/

When I do a search, it tells me "Found records: 1/2 (Reset filters)" but I can't find the total number of records when not doing a search.

In reply to Mela Sogono

Re: Count entries in a database activity

by William Lu -
Picture of Particularly helpful Moodlers

Hi Mela,

You are right, it is not on "View List", sorry for my mistake in my previous post, corrected now.

Thanks.


In reply to William Lu

Re: Count entries in a database activity

by Mela Sogono -

Thanks, but I was hoping to display this information in the "View list" view... oh well.

In reply to Gain Oloya

Re: Count entries in a database activity

by Ambrish Tiwari -

Hello Gain

Counting the number of records in the table. If we wanted to know the number of items that exist in our product table, we could use the following query:

SELECT COUNT(*)FROM product;

This query returns the number of rows in the table