Bob
2012-03-21 10:49:08 +08:00
class tdworkclass
{
var $dbLinkUser = "zte_cjw";
var $dbLinkPass = "c23ww138";
var $dbLinkBase = "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST= 134.192.114.7)(PORT=1522)))(CONNECT_DATA=(SID=crm)))";
var $sqlList;
var $sqlParam;
function tdworkclass( $id )
{
$query = "select td_sql_id,td_sql_val,td_sql_order,param_code,param_order,param_type from v_td_sql_param where td_id='".$id."' order by td_sql_order,param_order";
$function = $this->gettdfunction( );
$data = $function->runselect( $query );
if ( $data )
{
$j = 0;
for ( ; $j < count( $data ); ++$j )
{
if ( $data[$j][3] )
{
$Param[$data[$j][0]][] = $data[$j][3];
}
$List[$data[$j][0]] = $data[$j][1];
}
$this->setsqlarr( $Param );
$this->setsqllist( $List );
}
}
function getdbase( )
{
$dbase = new oradb( );
$dbase->open( $this->dbLinkBase, $this->dbLinkUser, $this->dbLinkPass );
return $dbase;
}
function gettdfunction( )
{
return new functionclass( );
}
function setsqlarr( $arr )
{
$this->sqlParam = $arr;
}
function setsqllist( $arr )
{
$this->sqlList = $arr;
}
}
?>