public function getFirst($q = [], $data = [])
     {
         $q['limit'] = 1;
         $list = $this->get($q, $data);

         return (count($list)) ? $list[0] : null;
     }
public function getFirst($q = [], $data = [])
     {
         $q['limit'] = 1;
         $list = $this->get($q, $data);

         return (count($list)) ? $list[0] : null;
     }
public function getFirst ( $ q = [ ] , $ data = [ ] ) { $ q [ 'limit' ] = 1 ; $ list = $ this -> get ( $ q , $ data ) ; return ( count ( $ list ) ) ? $ list [ 0 ] : null ; }
Gets the first item as predfined by any previous functional operators

@param array $q    different elements of sql
@param array $data elements used for binding

@return array|null the first matching record as associated array or null
Gets the first item as predfined by any previous functional operators