Beispiel #1
0
/** obsolete, use DB::countRecords */
function countRecords($tnm, $where = array())
{
    global $db;
    $q = new Select($db, $tnm);
    $q->addFields('COUNT(*)');
    $q->addWhereArray($where);
    $q->run();
    $q->fetch();
    $count = $q->at(0);
    $q->close();
    return $count;
}
Beispiel #2
0
 /**
  * Return the completed time widgets.
  */
 function fetch()
 {
     $name = '%s[%s]';
     $n['h'] = sprintf($name, $this->name, 'hour');
     $n['m'] = sprintf($name, $this->name, 'min');
     $n['e'] = sprintf($name, $this->name, 'ext');
     $h = new Select($n['h'], $this->h, $this->hour, false, 1, null, $this->class);
     $m = new Select($n['m'], $this->m, $this->min, false, 1, null, $this->class);
     $e = new Select($n['e'], $this->e, $this->ext, false, 1, null, $this->class);
     return $h->fetch() . ' : ' . $m->fetch() . $e->fetch();
 }