• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Cannot make num_rows work

#8
[eluser]Beginers[/eluser]
of course the data will not display because you did not specify the fields that you want to display:
try to display it all using foreach loop
Code:
$query = $this->db->query('SELECT * FROM my_table');

foreach ($query->result_array() as $row)
{
   echo $row['fieldname'];
}


Messages In This Thread
Cannot make num_rows work - by El Forum - 10-16-2012, 08:09 PM
Cannot make num_rows work - by El Forum - 10-16-2012, 08:23 PM
Cannot make num_rows work - by El Forum - 10-16-2012, 08:41 PM
Cannot make num_rows work - by El Forum - 10-16-2012, 10:16 PM
Cannot make num_rows work - by El Forum - 10-16-2012, 10:52 PM
Cannot make num_rows work - by El Forum - 10-16-2012, 11:54 PM
Cannot make num_rows work - by El Forum - 10-17-2012, 12:56 AM
Cannot make num_rows work - by El Forum - 10-17-2012, 02:00 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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