• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to read a single record from result()?

i am trying to read a signle record from result().
in my blog system i need to show username which i will get only from userid field which is present in both tables (blog & users).
following is the code

code for controller

code for model:-
$sql=$this->db->get('events',$num, $offset);
foreach($sql->result() as $etdata)
return $eventdata;

code for view:-
foreach($p as $row)
  echo $p->BlogTitle;
  echo posted by $this->session->userdata('funame');

Thanks for the help,

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

Users browsing this thread:
1 Guest(s)

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.