![]() |
'get' problem on active record - 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: 'get' problem on active record (/showthread.php?tid=6037) |
'get' problem on active record - El Forum - 02-12-2008 [eluser]quals_jack[/eluser] using postgre I do this: $myQuery = $this->db->get('test11'); got error message as: ERROR: syntax error at or near ")" LINE 2: FROM ("test11") ^ SELECT * FROM ("test11") how can it becomes like 'SELECT * FROM ("test11")'? 'get' problem on active record - El Forum - 02-12-2008 [eluser]tonanbarbarian[/eluser] the active record code is trying to ensure that table and field names are escaped correctly so that they are not subject to SQL injection attacks I think there is a bug in a number of the SQL drivers in that they do not escape correctly for the different databases I am sure if you search the forums you will find examples of modifications you can make to fix it. 'get' problem on active record - El Forum - 02-13-2008 [eluser]quals_jack[/eluser] I got the same error message when using pgAdm to try 'SELECT * FROM ("test11"); '. So that means postgreSQL doesn't understand '("test11")'. maybe I should set somethingon postgreSQL? 'get' problem on active record - El Forum - 02-13-2008 [eluser]Seppo[/eluser] Take a look here, the first comment has the solution. 'get' problem on active record - El Forum - 02-13-2008 [eluser]quals_jack[/eluser] Thanks Seppo! It works now. |