A-A+
有id时候返回哪一个结果呢
function getLicenseCategories($id=""){
$where = "";
if($id)
$where=" WHERE id in (".$id.");";
$where = "";
if($id)
$where=" WHERE id in (".$id.");";
$query = "SELECT * FROM ".$this->getPrefix()."license_categories".$where;
$result = $this->Execute($query);
if (!$result||$result->RecordCount()<1)
return false;
if($id!=""){
$row = $result->FetchRow();
return $this->_fetchLicenseInfomation($row);
}
else{
$licenseCategories = Array ();
while ($row = $result->FetchRow()) {
array_push($licenseCategories, $this->_fetchLicenseInfomation($row));
}
return $licenseCategories;
}
当有id时候返回$this->_fetchLicenseInfomation($row)为什么比较好。