src/MVC/Model/ORM_.php
public static function count($where)
     {
         $self = self::instance();
         $rows = new ModelArray();
         //
         $sql = 'select count(*) as cnt from '.$self->DBtable." where $where ";
         $data = Database::read($sql, 1);
         //
         return $data[0]['cnt'];
     }
public static function count($where)
     {
         $self = self::instance();
         $rows = new ModelArray();
         //
         $sql = 'select count(*) as cnt from '.$self->DBtable." where $where ";
         $data = Database::read($sql, 1);
         //
         return $data[0]['cnt'];
     }
public static function count ( $ where ) { $ self = self :: instance ( ) ; $ rows = new ModelArray ( ) ; // $ sql = 'select count(*) as cnt from ' . $ self -> DBtable . " where $where " ; $ data = Database :: read ( $ sql , 1 ) ; // return $ data [ 0 ] [ 'cnt' ] ; }
To count rows by where clause.

@param $where (string) : the where clause
To count rows by where clause .