• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.