function get_where($table = '', $where = null, $limit = null, $offset = null)
{
if ($table != '') {
$this->from($table);
}
if (!is_null($where)) {
$this->where($where);
}
if (!is_null($limit)) {
$this->limit($limit, $offset);
}
$sql = $this->_compile_select();
$result = $this->query($sql);
$this->_reset_select();
return $result;
}