• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.
  • Chevereto Support CLST

    Support response

    Support checklist

Statistical picture of how the number of home page

jiajieit

Chevereto Member
How to display images have been uploaded by the number of servers in the home page.

I want to show the dashboard above picture number (guest status) in the home page, and ask what function to achieve?
 
PHP:
CHV\DB::queryFetchSingle('SELECT COUNT(*) AS total from ' . CHV\DB::getTable('images'));
 
PHP:
CHV\DB::queryFetchSingle('SELECT COUNT(*) AS total from ' . CHV\DB::getTable('images'));

Hello, Rodolfo,
After using this code can not display images correctly quantity,As shown below;

footer.php
搜狗截图20150301155112.png


搜狗截图20150301155126.png
 
Last edited:
You are missing the echo.

PHP:
echo CHV\DB::queryFetchSingle('SELECT COUNT(*) AS total from ' . CHV\DB::getTable('images'));
 
PHP:
echo CHV\DB::queryFetchSingle('SELECT COUNT(*) AS total from ' . CHV\DB::getTable('images'))['total'];
 
Back
Top