function get_articles() {
$articles = $this->db->query("SELECT * FROM tbl_articles WHERE status = '1' AND lang = '$this->locale' ORDER BY id DESC"); foreach($articles->getResult('array') as $a) {
$articleId = $a['id']; // I would like pass this variable to get_ip function
}
return $articles;
}
function get_ip() {
$test = $this->db->query("SELECT * FROM tbl_images_preview WHERE article_id = ".$articleId."");
return $test;
}