MYSQL Query solution-php Tutorial

Source: Internet
Author: User
MYSQL Query if & nbsp; (substr ($ remessage,) & #39; TP & #39;) {$ PSNstr_replace (& #39; TP & #39 ;, & #39; & #39;, $ remessage); echo & nbsp; $ PSN; exit; SQL & quot; select & nbsp; id & nbsp MYSQL Query
If (substr ($ remessage, 0, 2) = 'TP '){
$ PSN = str_replace ('TP ', '', $ remessage );
Echo $ PSN;
Exit;
SQL = "select id from tempnum where id = '". intval ($ PSN )."'";
$ Rs = $ conn-> execute ($ SQL );
If ($ rs-> EOF)
{
SMSSendReturnStr ($ config ['sp '], $ rs-> fields ["MobileNum"], 'Sorry, you have not found the person you want to vote for. Please check. Thank you for your participation ');
}
Else {
$ Conn-> execute ("update tempnum set PS = PS + 1 where id = '". $ PSN ."'")
}
Break;
Exit;

}

--------------------------------------
$ Remessage refers to the text message sent by the user via the mobile phone. the format is TP000001 TP followed by the ID corresponding to the number, but I don't know why the error is always found. The text message format is correct first.


Parse error: syntax error, unexpected '= 'In D: \ web \ XXX. php on line 90


XIEXIE

------ Solution --------------------
SQL = "select id from tempnum where id = '". intval ($ PSN )."'";
==============================
$ SQL = "....";

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.