[eluser]sherwoodforest[/eluser]
I am having trouble finding a bug in my code
I want to get all the records is the sms_interpreted database
I have echoed the $this->db->last_query
SELECT * FROM (`SMS_interpreted`) WHERE `lead_id` = 'L658327' ORDER BY `interpreted_id` desc LIMIT 500
followed by a count $this->db->count_all_results()
which give me 1
but when I paste the above query in php my admin I get 216 total rows but I only got 1 back in my code.
here is my code
function get_entries_lead($lead)
{
$this->db->order_by("interpreted_id","desc");
$this->db->where('lead_id',$lead);
$query = $this->db->get('SMS_interpreted',500);
echo('<br>'.$this->db->last_query());
echo('<br>'.$this->db->count_all_results());
var_dump($query);
return $query->result();
}
where should I look for my error or why am I only getting one result?