The command can be directly run in the command line and can be found in phpMyAdmin, but an error occurs when it is written into the program .! IMG (img.ask.csdn.netupload201601_1451922395_748358.png )! []((Im1451922406_905598.png) this is the & quot; $ SQL & quot; select * from $ table_listw phpphpmyadminmysqli
The command can be directly run in the command line and can be found in phpMyAdmin, but an error occurs in the program.
The code is this
$ 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 (); the actual output result of the SQL statement is select * from qq_list where length (qq = 5) and qq like '% 100' and wuzheng;
Bool (false) prompt after running)