Home > Backend Development > PHP Tutorial > mysql查询种

mysql查询种

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 13:16:00
Original
824 people have browsed it

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 是什么??哪有赋值的??

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
Latest Issues
Query paging
From 1970-01-01 08:00:00
0
0
0
Why is the native query going wrong? . .
From 1970-01-01 08:00:00
0
0
0
query question
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template