The same data is returned by the server after ie is sent

Source: Internet
Author: User
After the same data is sent by ie, the server returns different results. ask a question: the same parameter transmission. the response of ie and other servers is inconsistent. jquery at the front end of post mode uses escape to transcode foldername, the backend is & nbsp; $ par [foldername] unescape ($ par [foldername]); $ midsexplode (, $ par [same data as mid, ie, the server returns different results after sending
Ask a Question
For the same parameter transmission, the response of IE and other servers is inconsistent, and the post method
Foreground jquery, which uses escape to transcode foldername. The background is
$ Par ['foldername'] = unescape ($ par ['foldername']);
$ Mids = explode (',', $ par ['mid ']); // list of emails to be deleted
$ Res ['SQL'] = $ par ['foldername']; // debug1
If ($ par ['foldername'] = "deleted" | $ par ['foldername'] = "draft box "){
$ Par ['delete'] = true; // delete all items in the recycle bin
$ Res ['SQL']. = 'a'. $ par ['foldername']; // debug2
}

The result shows that $ par ['delete'] = true is not entered in ie. this if judgment is used to solve the problem.

Ff to view the returned results, can return "deleted AA deleted" to meet the logic, while ie requests will only return "deleted", if it does not go in, solve

Share: More


------ Solution --------------------
Echo $ par ['foldername'];
See what it is
------ Solution --------------------
Print the $ par ['foldername'] before and after unescape in ie. check the result.
------ Solution --------------------
$ Res ['SQL']. = 'a'. $ par ['foldername']; // debug2

This is a strange way of writing.
------ Solution --------------------
$ Par ['foldername'] = trim ($ par ['foldername']);

As for how to increase the number, you need to see your page code
------ Solution --------------------
If the field is of the char or varchar type, MySQL uses the PADSPACE verification rules when comparing strings to ignore the space characters at the end of the field. to achieve exact match, you can use the following methods:
Method 1: Use the like statement;
Method 2: Use the binary type. for example, select binary 'a' = 'A'
Method 3: Add Another length () condition. for example, select col from table where col = 'a' and LENGTH (col) = LENGTH ('A ')

Official Manual description (version 5.0 ):
Http://dev.mysql.com/doc/refman/5.0/en/char.html
11.1.6.1. The CHAR and VARCHAR Types
All MySQL collations are of type PADSPACE. this means that all CHAR, VARCHAR, and TEXT values in MySQL are compared without regard to any trailing spaces. "Comparison" in this context does not include the LIKE pattern-matching operator, for which trailing spaces are significant.

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.