我正在尝试使用以下代码在表中插入数据。
$query2 = "insert into aerion. prosp_contact(prosp_consult_id,contact_id,prosp_contact_type,summary) VALUES(".$pid.",'".$id1."','".$cnt_typ[$i]."','".$cnt_smry[$i]."') ";
$res2 = mysql_query($query2) or die(mysql_error()) ;
查询返回成功状态,但数据未获取插入表。任何帮助将不胜感激。
答案 0 :(得分:0)
缺少单引号用作
$query2 = "INSERT INTO aerion.
prosp_contact(prosp_consult_id,contact_id,prosp_contact_type,summary)
VALUES('".$pid."','".$id1."','".$cnt_typ[$i]."','".$cnt_smry[$i]."') ";
$res2 = mysql_query($query2) or die(mysql_error()) ;
答案 1 :(得分:0)
抱歉有问题,
I found solution. There was error in my logic. row was getting deleted immediately after it was added.
感谢您的时间。