Db prefix + dots in the query problem |
[eluser]GIN[/eluser]
Hi. I'm not sure is that bug or not, but here is another similar problem http://ellislab.com/forums/viewthread/77767/ Anyway, my problem is: I have a db prefix - sg_ I have this active record code: Code: $this->db->select('g.id, g.name, g.eng_name, g.price, g.code, Code: SELECT g.id, g.name, g.eng_name, g.price, g.opt_price, g.code, Look at this section IF(CHAR_LENGTH(g.name)>40, CONCAT(LEFT(g.name, 40), "..sg_."), g.name) as short_name If I have two or more dots - db_prefix appears in short_name (sg_) If I have one dot there - I got syntax error in sql query: IF(CHAR_LENGTH(g.name)>40, CONCAT(LEFT(g.name, 40), sg_"."), g.name) as short_name Other symbols besides dots not makes problem. I think problem in _protect_identifiers method in CI_DB_driver class, but can't understand what happens. What do you think? |
Messages In This Thread |
Db prefix + dots in the query problem - by El Forum - 02-03-2010, 06:48 PM
Db prefix + dots in the query problem - by El Forum - 02-03-2010, 07:21 PM
Db prefix + dots in the query problem - by El Forum - 02-04-2010, 04:05 AM
Db prefix + dots in the query problem - by El Forum - 02-04-2010, 06:14 PM
Db prefix + dots in the query problem - by El Forum - 02-04-2010, 07:02 PM
|