Home > Backend Development > PHP Tutorial > php mysql_query返回值问题

php mysql_query返回值问题

WBOY
Release: 2016-06-23 14:17:10
Original
902 people have browsed it

我的 mysql类里边有这么一个方法

function indeup($sql){
if(mysql_query($sql,$this->ID)){
return true;
}else{
$this->ErrMsg();
}
}


在用到的时候这样

$mysql=new mysql;

$c=$mysql->indeup("sql........insert  delete  update");

这个 我就判断不了 $c的返回值了  求高手解答


回复讨论(解决方案)

var_dump();打出来看看就可以了啊

如果执行的话,返回来是true ,执行错的话就是错误信息

嗯 是这样的 我要做判断 打印出来不好吧

var_dump($c); 贴出结果

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template