FAQs about mysql

Source: Internet
Author: User
Strange mysql problem, please teach PHPcode $ SQL & quot; select * from {$ BIAOTOU} lottery_resultwhereto_days (now () to_days (lotterydate) andusername {$ _ SESSION [& quot; duoduouser & quot;]} andlotteryid mysql is a strange problem.
PHP code
  $ SQL = "select * from {$ BIAOTOU} lottery_result where to_days (now () = to_days (lotterydate) and username = '{$ _ SESSION ["duoduouser"]}' and lotteryid = {$ lotteryid} "; echo $ SQL; exit;


Output
? Select * from duoduo_lottery_result where to_days (now () = to_days (lotterydate) and username = 'wzxinchen' and lotteryid = 23
Let's try to analyze this sentence with the command line to see if the syntax is too close.
I cannot even use the syntax here.
If I rewrite the word 'select', I will pass the record. why? All codes are unified.

------ Solution --------------------
If you change the select statement, you will be able to understand it.

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.