• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
missing db prefix in where clause after upgrading to CI 2.1.2+ (current from github)

#1
[eluser]rip_pit[/eluser]
I just upgraded from CI v2.1.? to 2.1.2 (current github download : EllisLab-CodeIgniter-v2.1.0-2750-gf82914a)

I use CI for sometimes now so i'm a bit experienced with upgrades

After the upgrade when i do i single select where from i got this :

Quote:DB ERROR:
A database error has occured.
Error Number: 1054
Unknown column 'acl_users.id' in 'where clause'
SELECT `rut_acl_users`.*, `rut_acl_users`.`id` as `id`, `rut_acl_users`.`id` as `user_id` FROM `rut_acl_users` WHERE `acl_users`.`id` IS NULL LIMIT 1
Filename: ***\system\database\DB_driver.php
Line Number: 384

it seems to be related to the generated where clause :
the outputed mysql string shows that db prefix is missing in the where clause


i traced the error until "system\database\DB_query_builder.php"
L410: protected function _where($key, $value = NULL, $type = 'AND ', $escape = NULL)
but now i'm stuck and i don't even know if i'm in the right place to look at.

Any help appreciated !


config/Database.php contains
Code:
'hostname' => 'localhost',
'username' => 'root',
'password' => '',
'database' => 'custom_db1',
'dbdriver' => 'mysql',
'dbprefix' => 'rut_',
'pconnect' => TRUE,
'db_debug' => TRUE,
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'latin1',
'dbcollat' => 'latin1_swedish_ci',
'swap_pre' => '',
'autoinit' => TRUE,
'stricton' => FALSE,
'failover' => array(),
'active_r' => TRUE,


#2
[eluser]rip_pit[/eluser]
submitted the issue on github
http://github.com/EllisLab/CodeIgniter/issues/1611


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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