$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.
私は何を間違っていますか?誰かがこれについて私を助けることができますか? お願いします!
ありがとうございました!