[eluser]CodeIgniterNoob[/eluser]
I have a function that returns an array with alot of numbers, and I need to use all those numbers in a query, basically search a table for all the records that match those numbers.
Heres my query function, so far it only returns one result, which is wrong.
Code:
foreach ($numbers as $key => $value)
{
$this->db->where('country', $country);
$this->db->where('postal', $key);
$this->db->like('state', $state);
$this->db->orderby('city','asc');
$Q = $this->db->get('us_stores');
if($Q->num_rows()>0)
{
return $Q->result_array();
}
I know theres something wrong here, I was thinking of putting it in a loop for each number.