Answer the question
In order to leave comments, you need to log in
Why does the query return a column and not a row and at the same time display only the very first character from the cell?
Controller:
foreach($this->model_extension_module_track->getCustomer($code) as $result){
$data['customers'][] = array(
'id' => $result['id']
);
}
class ModelExtensionModuleTrack extends Model {
public function getCustomer($customer_id) {
$query = $this->db->query("SELECT DISTINCT * FROM `oc_customers_track` WHERE `id` = '" . (int)$customer_id . "'");
return $query->row;
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question