在mysql和php中插入+ 1

时间:2013-07-21 02:39:04

标签: mysql post

我如何插入值+ 1

      $id_agen = $_POST['id_agen'] + 1;
      $type = $_POST['type'];
      $harga = $_POST['harga'];
      $jenis = $_POST['jenis'];`enter code here`
      $count = count($_POST['harga']);
      for ($i=0; $i<$count; $i++) {
      mysql_query("INSERT INTO tbl_harga_agen (`id_agen`, `hrg_agen`, `type`,       `id_jenis` )VALUES('$id_agen[$i]' ,'$harga[$i]', '$type[$i]', '$jenis[$i]' )");
}

在行$ id_agen中,如何插入此

0 个答案:

没有答案