Welcome Guest, Not a member yet? Register   Sign In
Select with string type alias
#1

Hi,

I try to query with alias a string but it does not work: 

$query=$this->db->query('SELECT id_observation as "1" FROM Observation ');

return $query->result();


but this work well with letters :

$query=$this->db->query('SELECT id_observation as "testcolumname" FROM Observation ');

return $query->result();

I did a print_r($this->db->last_query()); and the result works well directly on phpmyadmin but not within the codeigniter framework
I tried to change some settings to the database configuration but it is still the same problem
Reply




Theme © iAndrew 2016 - Forum software by © MyBB