When I try to delete a tarriffgroup, I get the following error:
Database error: Invalid SQL: SELECT label, id FROM call_tariff
MySQL Error: 1146 (Table 'mya2billing.call_tariff' doesn't exist)
I checked in CC_var_tariffgroup.inc and located the bug in following code:
$DBHandle_max = DbConnect();
$resmax = $DBHandle_max -> query("SELECT * FROM cc_tariffplan");
$numrow = $DBHandle_max -> num_rows();
if ($numrow>0){
$FG_TABLE_EDITION[]=array ("TARIFFPLAN",
"cc_tariffgroup_plan:idtariffplan:cc_tariffplan LEFT JOIN cc_tariffgroup_plan ON cc_tariffplan.id=cc_tariffgroup_plan.idtariffplan:
DISTINCT cc_tariffplan.tariffname, cc_tariffplan.id:
cc_tariffgroup_plan.idtariffgroup = %id:
idtariffgroup:%2 - (%1)::::%1:id='%1'",
'$value',
"SELECT",
"",
"",
"",
"sql",
"call_tariff",
"id",
"", "", "%1 : (%2)");
$FG_TABLE_COMMENT[]="";
}
I don't quite understand what is the purpose of this code. I suppose it was suposed to delete the record from the cc_tariffgroup_plan table for the given tariffgroup, but I am not sure.
If anybody has a comment on this please post it (Areski?).
|