$query = DB::select('thing')->from('things')->where('thing', '=', 'something');
if ($other_thing)
{
$query->and_where('other_thing', '=', 'something else');
}
$query->order_by('thing', 'ASC')->limit(10)->execute()->as_array();
foreach ($query as $row)
{
echo $row['thing'];
}
问题是什么?
好:
echo $row['thing'] -> nothing.
print_r($query) -> an object and not an array.
我究竟做错了什么?有人可以帮我吗?请!
谢谢!