| Posted: 02/08/2008, 7:35 AM |
|
1. I have modif query report like this :
function Open()
{
include "../extqry.php";
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent);
$this->SQL = $QRY ; // this var take from external file extqry.php
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteSelect", $this->Parent);
$this->query(CCBuildSQL($this->SQL, $this->Where, $this->Order));
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteSelect", $this->Parent);
}
2. PROBLEM : variable in custom sql can't be detect in ccs but detect if query run out from ccs
Custom Query :
$SQL = "SELECT * FROM $t_costumer WHERE nochek='A124' AND kd_log='{$sat}' AND year='{$Thang}' {$AND} GROUP BY date ";
example variable value like this :
$t_costumer =' cos_order1.`t_costumer@1375900230101` '; // var not detect in ccs query but detect if query run out from ccs
$sat = ' 02324256643234 ' ; // var not detect in ccs query but detect if query run out from ccs
3. Real query like this :
$SQL = "SELECT * FROM cos_order1.`t_costumer@1375900230101` WHERE nochek='A124' AND kd_log='02324256643234' AND year='2008' date_from >= '2006-01-02' AND date_and <= '2006-12-08' GROUP BY date ";
|