<?php
class VModel_Admin_group extends VModel
{
public function __construct()
{
parent::__construct();
}
public function exists($column, $value, $group_id = 0)
{
$this->db->query("
SELECT adv_group_id
FROM #__adv_groups
WHERE ".$column." = '".$this->db->escape($value)."'
AND adv_group_id != ".(int) $group_id."
LIMIT 1"
);
if ($this->db->affected_rows()) {
return $this->db->fetch_field('adv_group_id');
}
return false;
}
}