Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Count the total amount of records returned

Enthusiast ,
Apr 18, 2013 Apr 18, 2013

Copy link to clipboard

Copied

Is there a way in DW to count and display the total amount of records in my DB table?

Eg: I might have 10,000 records in my database, but only 55 match the SELECT statement, so I want to show a visual counter saying '55 articles in this section' on my page.

TOPICS
Server side applications

Views

582
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 18, 2013 Apr 18, 2013

Copy link to clipboard

Copied

All recordsets contain a property that contains the rowcount. What scripting language are you using?

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Apr 19, 2013 Apr 19, 2013

Copy link to clipboard

Copied

PHP/MySQL.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 19, 2013 Apr 19, 2013

Copy link to clipboard

Copied

LATEST

Choose one of these  function appropriate to the api you are using:

http://php.net/manual/en/function.mysql-num-rows.php

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines