How does PHP query the SQL loaded variable table?

Source: Internet
Author: User
PHP: How to query SQL loaded variable tables such as selecting a line & nbsp; & nbsp; & lt; select & nbsp; namexianlu & gt; & nbsp; & nbsp; & How does nb PHP query the SQL loaded variable table?
How does PHP query the SQL loaded variable table? for example:


Select line
203 207 213 214 225 283

Select different lines to load tables that do not understand
This is the original sentence,
$ Q = "SELECT * FROM 'line' left join research2 on line. busname = research2.busname WHERE banben is NULL or banben like '% {$ _ REQUEST ['banben']} % '";

An error is reported after modification based on the original sentence.
$ Q = "SELECT * FROM'' % {$ _ REQUEST ['xianlu']} % ''left join research2 on '% {$ _ REQUEST ['xianlu']} % '. busname = research2.busname WHERE banben is NULL or banben like '% {$ _ REQUEST ['banben']} % '";

------ Solution ----------------------
$ Q = "SELECT * FROM '{$ _ REQUEST ['xianlu']} 'left JOIN research2 on' {$ _ REQUEST ['xianlu']} '. busname = research2.busname WHERE banben is NULL or banben like '% {$ _ REQUEST ['banben']} % '";

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.