<?php
defined('GCMS') or die('Ошибка совместимости!');
final class mysql extends mysqli {
public function dbcount($field,$table,$where = '1') {
$ass = $this->stmt_init();
$ass = $this -> query("SELECT ".$field." FROM ".$table." WHERE ".$where." LIMIT 1");
if ($ass->errno) {
die('Select Error ('.$ass->errno.') '.$ass->error);
}
$arr = $ass -> fetch_row();
return $arr[0];
}
}
?>