Database

Count entries in a database activity

 
Gain Oloya
Count entries in a database activity
 

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

 
Average of ratings: -
Picture of William Lu
Re: Count entries in a database activity
Particularly helpful Moodlers

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

 
Average of ratings: Useful (1)
Picture of Mela Sogono
Re: Count entries in a database activity
 

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.

 
Average of ratings: -
Picture of William Lu
Re: Count entries in a database activity
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.


 
Average of ratings: -
Picture of Mela Sogono
Re: Count entries in a database activity
 

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

 
Average of ratings: -
Picture of Ambrish Tiwari
Re: Count entries in a database activity
 

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


 
Average of ratings: -