Posting late at night is a little different

Source: Internet
Author: User
Posting in the middle of the night, a little strange Hello, function & nbsp; chk_commit_query (table_name, reg_id_base, & nbsp; reg_id_cmp, & nbsp; csv_file) {& nbsp; if (chk_items.lengt Post late at night, a little strange
Hello,
Function chk_commit_query (table_name, reg_id_base, reg_id_cmp, csv_file ){
If (chk_items.length = 0 ){
Alert ('No items selected! And select all items in default! ');
Chk_ SQL _base = 'select * from '+ table_name + 'Where Regression_Id =' + reg_id_base;
Chk_ SQL _cmp = 'select * from '+ table_name + 'Where Regression_Id =' + reg_id_cmp;
}
Else {
Chk_ SQL _base = 'SELECT TestCase, Design_name ,';
Chk_ SQL _cmp = 'SELECT TestCase, Design_name ,';
For (var I = 0; I Chk_ SQL _base + = chk_items [I] + ','
Chk_ SQL _cmp + = chk_items [I] + ','
}
Chk_ SQL _base + = chk_items [I] + 'from' + table_name + 'Where Regression_Id = '+ reg_id_base;
Chk_ SQL _cmp + = chk_items [I] + 'from' + table_name + 'Where Regression_Id = '+ reg_id_cmp;
}
XmlHttp = GetXmlHttpObject ()
If (xmlHttp = null)
{
Return
}
Var url = "show_cmp_internal_chk_table.php"
Url = url + "? SQL _chk_cmp1 = "+ chk_ SQL _cmp;
Url = url + "& SQL _chk_base =" + chk_ SQL _base;
Url = url + "& csv_file =" + csv_file;
Url = url + "& sid =" + Math. random ()
Alert (url );
// The data obtained here is: Reference
Show_cmp_internal_chk_table.php? SQL _chk_cmp1 = select TestCase, Design_name, Succeed, Syn from ACE_CHK_FLOW where Regression_Id = 585 & SQL _chk_base = select TestCase, Design_name, Succeed, syn from ACE_CHK_FLOW where Regression_Id = 592 & csv_file = ACE_20130128-0150_VS_20130130-0150_Regression_QOR_dif_2013_02_03 & sid = 0.5060912349899407

XmlHttp. onreadystatechange = chk_stateChanged
XmlHttp. open ("GET", url, true)
XmlHttp. send (null)
}

Show_cmp_internal_chk_table.php:
 $csv_data4 = Array();
$sql_chk_cmp  = $_GET["sql_chk_cmp1"];
$sql_chk_base = $_GET["sql_chk_base"];
echo $sql_chk_base."
";
echo $sql_chk_cmp."
";
...

Here, $ SQL _chk_base has data, and $ SQL _chk_cmp is empty in any case. the url information also contains this data. What is this. Such ajax code is also used hundreds of times.

------ Solution --------------------
Is there a space after the url parameter?
------ Solution --------------------

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.