我在名为 Bills 的类上有这个函数,调用它时返回三个值。
function GetCashierDetail ($UserID){
$GetCashierID = "SELECT cashiers_CashierID,cashiers_Total,cashiers_Last_Total
FROM `cashiers`
WHERE `cashiers_CashierCloseDate` is null and `cashiers_Status`='0'
and `cashiers_Delete` = '0' and `cashiers_User` = '".$UserID."'";
$objQueryCashierID = mysql_query($GetCashierID) or die ("Error Query [".$strSQL."]");
$GetCashierIDResult = mysql_fetch_array($objQueryCashierID);
$BillsCashierID = $GetCashierIDResult['cashiers_CashierID'];
$CashierTotal=$GetCashierIDResult['cashiers_Total'];
$CashierLastTotal=$GetCashierIDResult['cashiers_Last_Total'];
$num=mysql_affected_rows();
// Return Data
return $cashier_data = array('cashierId'=>$BillsCashierID ,
'CashierTotal'=>$CashierTotal ,
'CashierLastTotal'=>$CashierLastTotal );
}
现在当调用这个函数
$BillDraftSubmit = new Bills;
$BillDraftSubmit->GetCashierDetail(71);
我需要像这样在变量上打印 $cashier_data
$ID = $BillsCashierID 以其他方式使用它。
我如何从类中读取此函数的值