mysql查询种

WBOY
WBOYOriginal
2016-06-13 13:16:00808browse

mysql查询类
function query($sql, $type = '') {
if(!($query = mysql_query($sql))) $this->show('Say:', $sql);
return $query;
}





function fn_select($table,$name){

  $this->query("select * from $table where id='$name'");

  }



我在下面调用时没反应。。


$result=$db->fn_select('news','0');
$row=$db->fetch_array($query);
echo $row['title'];


------解决方案--------------------
$row=$db->fetch_array($query);
$query 是什么??哪有赋值的??

Statement:
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