• 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

    • ⚠️ Got a Something went wrong message? Read this guide and provide the actual error. Do not skip this.
    • ✅ Confirm that the server meets the System Requirements
    • 🔥 Check for any available Hotfix - your issue could be already reported/fixed
    • 📚 Read documentation - It will be required to Debug and understand Errors for a faster support response

Code disk Space

Inspirats

Chevereto Member
Hello, I can get the number of image, user albums.

Can you help me get the space used as the dashboard

PHP:
<?php echo CHV\DB::queryFetchSingle("SELECT COUNT(*) as total FROM " . CHV\DB::getTable('images'))['total']; ?>
      <br />
      <?php echo CHV\DB::queryFetchSingle("SELECT COUNT(*) as total FROM " . CHV\DB::getTable('albums'))['total']; ?>
      <br />
      <?php echo CHV\DB::queryFetchSingle("SELECT COUNT(*) as total FROM " . CHV\DB::getTable('users'))['total']; ?>

Thank you
 
Last edited:
route.dashboard.php Line 114.

PHP:
'disk'    => ['used' => CHV\DB::queryFetchSingle(sprintf($image_size_count_qry . ' from %s', CHV\DB::getTable('images')))['count'], 'unit' => 'B']
 
Thank, but i have error... i 'm noob.

Code:
Parse error: syntax error, unexpected '=>' (T_DOUBLE_ARROW), expecting ',' or ';'

I try it:
PHP:
<?php echo CHV\DB::queryFetchSingle("SELECT COUNT(*) as total FROM " . CHV\DB::getTable('images'))['count'] . 'unit' => 'B']; ?>
 
You are doing it wrong, fix your PHP code. The dashboard coding is just a way to get those values, not intended to be used directly as you do.
 
Back
Top