特定のアイテムの最大入札額を選択し、最大入札額が見つかった行から詳細情報を返そうとしています。
現時点で私が持っている
$item_id = $this->input->post('item_id');
$this->db->from('bids');
$this->db->where('item_id', $item_id);
$this->db->where('outbid_alert', '1');
$this->db->select_max('bid_amount');
$query = $this->db->get();
return $query->result();
これはアイテムの最大入札額を返します。それは私が得た限りです。その行から残りのフィールドを取得する最良の方法は何ですか? 別のクエリを実行するか、サブクエリを使用しますか?
ありがとう!