mysql_select_db('bestfood123');
$user=$_POST['t4'];
$result = mysql_query("SELECT * FROM login WHERE username='$user'");
$info = mysql_fetch_array($result);
if($info['section']=="delhi")
{
mysql_query("insert into support values('a.','$status','$sbj','$message','$userid','$user','','','$date')");
printf("<h2>your incident id is: %d\n</h2>", mysql_insert_id());
$inci=mysql_insert_id();
}
else
{
mysql_select_db('bestfood123');
mysql_query("insert into support values('b.','$status','$sbj','$message','$userid','$user','','','$date')");
printf("<h2>your incident id is: %d\n</h2>", mysql_insert_id());
$inci=mysql_insert_id();
}
答案 0 :(得分:0)
如何添加两个不同的自动增量编号。到php mysql中的同一列
您无法在1个表格中创建2个主键。