[eluser]stephencoverdale[/eluser]
Hi All,
I get this error -
PHP Fatal error: Call to a member function row() on a non-object in /var/www/application/controllers/site.php on line 32
Here is the code
Code:
function scorecalc(){
$this->load->model("get_db");
$data['fbid'] = $this->get_db->getFBID();
foreach($data['fbid'] as $row){
$fbid = $row->fb_id;
$fbquery = $this->get_db->getFB($fbid);
$row = $fbquery->row();
$likes = $row->total_page_like;
$talkingabout = $row->talking_about_count;
$werehere = $row->were_here_count;
$score = $likes+$talkingabout+$werehere;
echo $score;
}
I did a var_dump and got the following results
array(1) { [0]=> object(stdClass)#22 (3) { ["total_page_like"]=> string(2) "43" ["talking_about_count"]=> string(1) "6" ["were_here_count"]=> string(3) "899" } }
Was wondering if anyone could see what was going on.
Thanks,
Steve