日期:2014-05-17 浏览次数:20605 次
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_items.length - 1;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);
//此处得到的数据为:
<?php
$csv_data4 = Array();
$sql_chk_cmp = $_GET["sql_chk_cmp1"];
$sql_chk_base = $_GET["sql_chk_base"];
echo $sql_chk_base."<br>";
echo $sql_chk_cmp."<br>";
...