The code for the thinkPHP fuzzy query is as follows: $ reg & nbsp ;=& nbsp; M ('doctor'); & nbsp; $ data & nbsp; =$ _ POST ['text']; & nbsp; $ map ['name'] & nb thinkPHP fuzzy query problem, the code is as follows:
$ Reg = M ('doctor ');
$ Data = $ _ POST ['text'];
$ Map ['name'] = array ('like', "% $ data % ");
$ Result = $ reg-> where ($ map)-> select ();
$ This-> doctor = $ result;
$ This-> display ('search ');
I don't know where an error has occurred. I don't display the query results or report the error thinkPHP thinkphp select. share:
------ Solution --------------------
Now that you can find the SQL statement, you can test it step by step!
"In dreamweaver, the result is not displayed." What do you mean? I don't understand. can dreamweaver directly bring the browser preview function?
------ Solution --------------------
How does it sound like your code compatibility problems?
More inclined to the compatibility problem of html + css + js
------ Solution --------------------
Reference:
No. an error is reported.
What error is prompted? Cannot even output SQL statements. Check your program.
------ Solution --------------------
$ This-> doctor = $ result ;???
What does it mean?
Assign a value to a template. isn't that true?
$ This-> assign ('name', $ name );