function WebPageTypeName($WebPageTypeId)
{
$result1=mysql_query("select WebPageTypeName from WebPageType where WebPageTypeId ='$WebPageTypeId'",$comm);
$myrow1=mysql_fetch_array($result1);
return "".$WebPageTypeId."";
}Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in
{
$result1=mysql_query("select WebPageTypeName from WebPageType where WebPageTypeId ='$WebPageTypeId'",$comm);
$myrow1=mysql_fetch_array($result1);
return "".$WebPageTypeId."";
}Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in
没有必要那样可以考虑使用pear库操作
会更加简单
$selectbyname = 'select * from bigtype where Name = ?';
global $CAE_DB;
$result = $CAE_DB->query($this->selectbyname,$name);
if (DB::isError($result)) {
$this->Error = $result->getMessage();
return;
}
$result->fetchInto($row,DB_FETCHMODE_ASSOC);
if (empty($row)) {
$this->Error = "无相关信息";
return;
}
return $row;