WordPress.org

Forums

ABASE
Producing a count for number of rows on page (2 posts)

  1. jjcostello01
    Member
    Posted 1 year ago #

    I am very please with being able to extract the information from my database. I need to produce lists for each year for the next five years, all on separate pages. What I would like to have is the total of the rows at the bottom of the page.
    Thanks.

    https://wordpress.org/plugins/abase/

  2. WHSHC
    Member
    Posted 4 months ago #

    Hi,

    Probably a little late, this worked for me:

    I've added stats on a table, you can see it in action here

    The shortcodes are shown below, I've removed my name and replaced with <table-name> but the fields are the same:

    [abase sql="SELECT Type AS 'Source Table',COUNT(*) as 'Number of Records',COUNT(DISTINCT(Surname)) AS 'Unique Surnames' FROM <table-name> GROUP BY Type ORDER BY Type ASC"]

    Total number of records = [abase sql="SELECT Count(Surname) FROM <table-name> "]

    Unique Surnames across all records = [abase sql="SELECT COUNT(DISTINCT(Surname)) FROM <table-name> "]

    Hope this helps.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • ABASE
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic