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 --------------------