I have question in codeigniter.
In CI I want to get all the rows when I am executing the query like
Select * from tablename
But when I am using the
return $query->row();
I am getting only one row.How can I get all the rows.I dont get any idea in this article
instead of this
$query->row();
use this
foreach ($query->result() as $row)
{
echo $row->field_name;
//use the database table fields name in the place of field_name property
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.