public function getTotal($useConnection = 'read')
    {
        $query = 'SELECT COUNT(*) AS cnt FROM contact';
        $stmt = Database::getConnection($useConnection)->prepare($query);

        if ($stmt->execute()) {
            if ($data = $stmt->fetch(\PDO::FETCH_ASSOC)) {
                return $data['cnt'];
            }
        }

        return 0;
    }
public function getTotal($useConnection = 'read')
    {
        $query = 'SELECT COUNT(*) AS cnt FROM contact';
        $stmt = Database::getConnection($useConnection)->prepare($query);

        if ($stmt->execute()) {
            if ($data = $stmt->fetch(\PDO::FETCH_ASSOC)) {
                return $data['cnt'];
            }
        }

        return 0;
    }
public function getTotal ( $ useConnection = 'read' ) { $ query = 'SELECT COUNT(*) AS cnt FROM contact' ; $ stmt = Database :: getConnection ( $ useConnection ) -> prepare ( $ query ) ; if ( $ stmt -> execute ( ) ) { if ( $ data = $ stmt -> fetch ( \ PDO :: FETCH_ASSOC ) ) { return $ data [ 'cnt' ] ; } } return 0 ; }
Get the total number of submissions in the system.
@param string $useConnection
@return int
Get the total number of submissions in the system .