mysql操作类(6)
来源:未知 责任编辑:责任编辑 发表时间:2015-10-08 14:15 点击:次
$this->show_error("sql语句错误:","暂时为空,没有任何内容");
}
}else{
return mysql_num_rows($this->result);
}
}
//根据insert update delete执行的结果驱动影响行数
public function db_affected_rows(){
return mysql_affected_rows();
}
//输出显示sql语句
public function show_error($message="",$sql=""){
if(!$sql){
echo "<font color='red'>" . $message . "</font>";
echo "<br>";
}else{
echo "<fieldset>";
echo "<legend>错误信息提示:</legend><br />";
echo "<div style='font-size:14px; clear:both; font-family:Verdana, Arial, Helvetica, sans-serif;'>";
echo "<div style='height:20px; background:#000000; border:1px #000000 solid'>";
echo "<font color='white'>错误号:12142</font>";
echo "</div><br />";
echo "错误原因:" . mysql_error() . "<br /><br />";
echo "<div style='height:20px; background:#FF0000; border:1px #FF0000 solid'>";
echo "<font color='white'>" . $message . "</font>";
echo "</div>";
echo "<font color='red'><pre>" . $sql . "</pre></font>";
相关新闻>>
- 发表评论
-
- 最新评论 更多>>