Late night post, some supernatural

Source: Internet
Author: User
Late Night post, a little supernatural
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 are: references
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 Reg ression_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 have data, $sql _chk_cmp anyway but empty, look at the URL information also has this data, this is what thing ah. This kind of Ajax code is used to say hundreds of times less.


------Solution--------------------
Is there a space behind 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.