You are missing the ORDER BY
and LIMIT
, why not implement them using the query builder's methods order_by()
and limit()
?
$results = DB::select('fname', 'lname', 'postcode', 'email')->from('mytable')
->order_by('id', 'DESC')->limit(1)->execute();