i have a pntables file for subjects module but unfortunately the columns of the tables are defined with prefix creating columns this way for example: nuke_subpages.pageid.
this module works this way perfectly, but when i try to include this module in the search module system, creating the corresponding pnsearchapi.php file, this execute the next function:
Code
$subjects = DBUtil::selectObjectArray(\'subpages\', $where);
The aim of this function is to create a select pointing to the pntables file of the subjects module but the pntables of this module built the columns with prefix because they are defined this way:
Code
$pntable[\'subpages\'] = $prefix.\'_subpages\';
$pntable[\'subpages_column\'] = array (\'pageid\' => \"$pntable[subpages].pageid\",
\'subid\' => \"$pntable[subpages].subid\",
etc\");
$pntable[\'subpages_column\'] = array (\'pageid\' => \"$pntable[subpages].pageid\",
\'subid\' => \"$pntable[subpages].subid\",
etc\");
and this provoke that the search dont works because it say that the columns do no exist. this is because this function needs to work at the moment of create the select that the columns of the pntables are defined without prefix.
My question is what have i to do to define a sinonym of this table in pntables but defining the columns without prefix. i have tryed to do this adding this two new variables
Code
$pntable[\'subpagesB\'] = $prefix.\'_subpages\';
y definiendo otra variable de columnas del siguiente modo sin prefijos, por ejemplo asi:
Code
$pntable[\'subpages_column\'] = array (\'pageid\' => \"pageid\",
etc\")
etc\")
and after calling to the function this way in the pnsearchapi file:
Code
$subjects = DBUtil::selectObjectArray([color=red]\'subpagesB[/color]\', $where);
but this do not work.
Someone can to bail me and help me? please
edited by: mercromina, datetimebrief
--
www.ahorradores.net
