我收到未捕获的异常:语法错误,无法识别的表达式:('29S','1803')
当我尝试在单击按钮时向数据库插入数据时($ clientid = 29s,$ id = 1803):
if(isSet($_POST['CPH_GridView1_region']))
{
$region=$_POST['CPH_GridView1_region'];
$country=$_POST['CPH_GridView1_country'];
$networkname=$_POST['CPH_GridView1_networkname'];
$mcc=$_POST['CPH_GridView1_mcc'];
$mnc=$_POST['CPH_GridView1_mnc'];
$comment=$_POST['CPH_GridView1_comment'];
mysql_query("insert into globalnetwork(region,country,networkname,mcc,mnc,comment) values ('$region','$country','$networkname','$mcc','$mnc','$comment')");
}
$id = mysql_insert_id();
$sql_selectclientid="SELECT * from client_list";
$queryRes1 = mysql_query($sql_selectclientid);
print $sql_selectclientid;
while($row = mysql_fetch_array($queryRes1)){
$clientid = $row['clientid'];
print $clientid;
$sql_networkinsertid="insert into $clientid(clientid,net_id)values ('$clientid','$id')";
$query = mysql_query($sql_networkinsertid);
print $sql_networkinsertid;
}
myjquery
$(function() {
$(".globalinsert_button").click(function() {
var CPH_GridView1_region = $("#CPH_GridView1_region").val();
var CPH_GridView1_country= $("#CPH_GridView1_country").val();
var CPH_GridView1_networkname= $("#CPH_GridView1_networkname").val();
var CPH_GridView1_mcc= $("#CPH_GridView1_mcc").val();
var CPH_GridView1_mnc= $("#CPH_GridView1_mnc").val();
var CPH_GridView1_comment= $("#CPH_GridView1_comment").val();
var dataString = 'CPH_GridView1_region='+ CPH_GridView1_region +'&CPH_GridView1_country='+CPH_GridView1_country+'&CPH_GridView1_networkname='+CPH_GridView1_networkname+'&CPH_GridView1_mcc='+CPH_GridView1_mcc+'&CPH_GridView1_mnc='+CPH_GridView1_mnc+'&CPH_GridView1_comment='+CPH_GridView1_comment;
if(CPH_GridView1_region=='')
{
alert("Please Enter Some Text");
}
else
{
$("#flash").show();
$("#flash").fadeIn(400).html;
$.ajax({
type: "POST",
url: "globalnetwork/insert.php",
data: dataString,
cache: false,
success: function(html){
$("#display").after(html);
window.location = "?action=globalnetwork";
$("#flash").hide();
}
});
} return false;
});
});