Hello, I have found a critical database error which is caused when manually changing users between membership packages. These are the steps take:
1 - Allow site to run with promotion membership package
2 - create new user (which will automatically be in promotion package)
3 - create new membership package (I called it " test")
4 - Manually move user from "promotion" to "test" package.
5 - Manually move back the user from "test" to "promotion"
After this I started receiving multiple emails reporting database problems. This is the content in the emails:
Database error in AA Beta5
Query:
SELECT COUNT(`tp`.`ID`) FROM `Profiles` AS `tp` LEFT JOIN `sys_admin_ban_list` AS `tbl` ON `tp`.`ID`=`tbl`.`ProfID` WHERE 1 AND (`tp`.`Couple`=0 OR `tp`.`Couple`>`tp`.`ID`) AND LOWER(`tl`.`Name`)='test'
Mysql error: Unknown column 'tl.Name' in 'where clause'
Found error in the file '/homepages/9/xxxxxx/htdocs/aabeta5/administration/profiles.php' at line 301.
Called 'db_value' function with erroneous argument #0.
Debug backtrace:
Array
(
[1] => Array
(
[file] => /homepages/9/xxxxxxx/htdocs/aabeta5/inc/classes/BxDolDb.php
[line] => 236
[function] => error
[class] => bxdoldb
[type] => ->
[args] => Array
(
[0] => Database query error
[1] =>
[2] => SELECT COUNT(`tp`.`ID`) FROM `Profiles` AS `tp` LEFT JOIN `sys_admin_ban_list` AS `tbl` ON `tp`.`ID`=`tbl`.`ProfID` WHERE 1 AND (`tp`.`Couple`=0 OR `tp`.`Couple`>`tp`.`ID`) AND LOWER(`tl`.`Name`)='test'
)
)
[2] => Array
(
[file] => /homepages/9/xxxxxx/htdocs/aabeta5/inc/classes/BxDolDb.php
[line] => 148
[function] => res
[class] => bxdoldb
[type] => ->
[args] => Array
(
[0] => SELECT COUNT(`tp`.`ID`) FROM `Profiles` AS `tp` LEFT JOIN `sys_admin_ban_list` AS `tbl` ON `tp`.`ID`=`tbl`.`ProfID` WHERE 1 AND (`tp`.`Couple`=0 OR `tp`.`Couple`>`tp`.`ID`) AND LOWER(`tl`.`Name`)='test'
)
)
[3] => Array
(
[file] => /homepages/9/xxxxxxxx/htdocs/aabeta5/inc/db.inc.php
[line] => 71
[function] => getone
[class] => bxdoldb
[type] => ->
[args] => Array
(
[0] => SELECT COUNT(`tp`.`ID`) FROM `Profiles` AS `tp` LEFT JOIN `sys_admin_ban_list` AS `tbl` ON `tp`.`ID`=`tbl`.`ProfID` WHERE 1 AND (`tp`.`Couple`=0 OR `tp`.`Couple`>`tp`.`ID`) AND LOWER(`tl`.`Name`)='test'
[1] => 0
)
)
[4] => Array
(
[file] => /homepages/9/xxxxxxxxx/htdocs/aabeta5/administration/profiles.php
[line] => 301
[function] => db_value
[args] => Array
(
[0] => SELECT COUNT(`tp`.`ID`) FROM `Profiles` AS `tp` LEFT JOIN `sys_admin_ban_list` AS `tbl` ON `tp`.`ID`=`tbl`.`ProfID` WHERE 1 AND (`tp`.`Couple`=0 OR `tp`.`Couple`>`tp`.`ID`) AND LOWER(`tl`.`Name`)='test'
)
)
[5] => Array
(
[file] => /homepages/9/xxxxxxxx/htdocs/aabeta5/administration/profiles.php
[line] => 84
[function] => getmembers
[args] => Array
(
[0] => Array
(
[view_type] => geeky
[view_start] => 0
[view_per_page] => 32
[view_order] =>
[ctl_type] => qlinks
[ctl_params] => Array
(
[by] => membership
[value] => test
)
)
)
)
)
Called script: /administration/profiles.php
Request parameters:
Array
(
[action] => get_members
[view_type] => geeky
[view_start] => 0
[view_per_page] => 32
[view_order] =>
[ctl_type] => qlinks
[ctl_value] => Array
(
[0] => by=membership
[1] => value=test
)
[memberID] => 1
[memberPassword] => 1f7f625657ecae00956f2b277b1e6b72
)
-- Auto-report system