CodeIgniter Forums
Dotted char in query with dbprefix - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Dotted char in query with dbprefix (/showthread.php?tid=50671)



Dotted char in query with dbprefix - El Forum - 04-04-2012

[eluser]Unknown[/eluser]
I have table prefix "ds_". When I execute this query:

Code:
$this->db->select('concat(id, ".") as id_dotted')
   ->where('parent < 10')
   ->get('categories AS c');

result is:

Code:
SELECT concat(c.path, `ds_"`.`")`
FROM (`ds_categories` AS c)
WHERE `parent` < 10

Naturally query don't work because dot is displayed (... `ds_"`.`")`.
This is a problem.

Do you have a solution?
Thanks.