The code is as follows:

Source: Internet
Author: User
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 );

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.