Ответов: 3 Просмотров: 75
|
public function limit_check($ip)
{
$this->time = time() - 24 * 60 * 60 ;
$this->sql = $this->db->prepare("SELECT * FROM confessions WHERE ip = ? AND time > ?");
$this->sql->bind_param('si', $ip, $this->time);
$this->sql->execute();
if (!$result = $this->sql->get_result()) {
die('Getting Result Error: (' . $this->sql->errno . ') ' . $this->sql->error);
} else {
return $result->num_rows;
} |