Home > Backend Development > PHP Tutorial > phpmyadmin-php调用mysqli查询出错

phpmyadmin-php调用mysqli查询出错

WBOY
Release: 2016-06-02 11:28:58
Original
835 people have browsed it

phpphpmyadminmysqli

语句直接在命令行运行就能查出接过来,在phpMyAdmin里面也能查到,但是写到程序里就出错,请大神帮忙看看。
图片说明
图片说明
代码是这个

<code> $sql =" select * from $table_list where $length_left qq $length_right $textif $t;"; $mysqli = new mysqli("localhost","root","root",'qq_db');$mysqli->set_charset("utf8");if ($mysqli->connect_errno){  die("Connect Error :".$mysqli->connect_error);  }$result = $mysqli->query($sql);var_dump($result);$mysqli->close();sql语句实际输出的结果是select * from qq_list where length( qq = 5)  and qq like '%1%' and wuzheng;</code>
Copy after login

运行后就提示bool(false)

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