An error occurred in the POST request simulating HTTP in WinInet. This POST was last edited by dimply in 2014-06-0914: 02: 10. in VS2012, breakpoint tracking was set for execution, the following error message is returned when the php file is requested: Invalid & nbsp; query: & nbsp; You & nbsp; have & nbsp WinInet. An error occurred while simulating the http post request.
This post was last edited by dimply at 14:02:10 on
In VS2012, the resumable trace execution is set and the following error message is returned if the php file is requested:
Invalid query:
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 ''at line 1
Whole query:
Select id, name from index_activities where top = 0
This information is from PHP.
$result = mysql_query($query);
After the statement line, the "if" request is output only when the request is unsuccessful. it is obvious that the mysql request is unsuccessful and can be confirmed that the php file is successfully called.
However, when I call the same PHP file with the same parameters on the webpage (in the GET mode), the returned value is correct.
In my php file, it is used to retrieve passing parameters.
$top = $_REQUEST['top'];
Therefore, the POST and GET parameters can both be obtained.
I don't know where the problem may be? Does passing parameters with WinInet cause any exceptions in this request string?
------ Solution --------------------
Invalid query:
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 ''at line 1
Whole query:
Select id, name from index_activities where top = 0
This information is clearly a database error!
If $ query = "select id, name from index_activities where top = 0"; yes
$ Query = "select id, name from index_activities where top = $ top"; no
This indicates that $ top has no value or is not a number.
------ Solution --------------------
$ Top = $ _ REQUEST ['top']; change to $ top = intval ($ _ REQUEST ['top']); try