What does the SQL statement in the php environment mean? Solution

Source: Internet
Author: User
What does the SQL statement in the php environment mean? $ Query_Recordset1sprintf (& quot; SELECT * FROMtk_userWHEREtk_user_statusLIKE % sANDtk_user_statusNOTLIKE % sANDtk_display_nameLIKE % sORDERBY SQL statement in the php environment. what does this mean?
$ Query_Recordset1 = sprintf ("SELECT * FROM tk_user WHERE tk_user_status LIKE % s AND tk_user_status not like % s AND tk_display_name LIKE % s order by tk_user_registered DESC ",....
What operations did you perform? "Tk_user_status LIKE % s AND tk_user_status not like % s" is NOT a conflict? But the program runs normally!

------ Solution --------------------
Is there anything wrong with this? Fill three strings with three placeholders.
------ Solution --------------------
This is not a conflict! Tk_user_status LIKE % s AND tk_user_status not like % s
The previous variable % s is different from the subsequent variable % s. The following is the input parameter variable.
GetSQLValueString ("%". $ colrole_Recordset1. "%", "text "),
GetSQLValueString ("%". $ colrole_dis. "%", "text "),

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.