什么是mysqli错误0?

时间:2017-03-22 08:20:53

标签: php mysqli

那是什么错误?怎么解决呢?

尝试将数据插入数据库时​​出现错误 它只显示一个数字

这是在执行准备语句

时发生的
 //Store data into variable
$judul = $_POST['judul'];
$blog_seo = seo_title($_POST['nama_blog']);
$kategori = $_POST['kategoriblog'];
$username = $_SESSION['namauser'];
$isi_blog = $_POST['isi_blog'];
$jam = $jam_sekarang;
$tgl = $tgl_sekarang;
$hari = $hari_ini;
$tag = $tag;



 //prepare query
$stmt= $con->prepare("INSERT INTO blog(judul,judul_seo,id_kategoriblog,username,isi_blog,jam,tanggal,hari,tag) VALUES(?,
?,
?,
?,
?,
?,
?,
?,
?)");
if($stmt===false){
    die("Error with prepare ".htmlspecialchars($mysqli->error));
}

//bind parameter
 $bp = $stmt->bind_param("sssssssss",$judul,$blog_seo,$kategori,$username,$isi_blog,$jam,$tgl,$hari,$tag);
 if($bp===false){
     die("Error with Binding ".htmlspecialchars($mysqli->error));
 }
}
//Execution
$bp = $stmt->execute();
if($bp===false){
    die("error with execution ".htmlspecialchars($mysqli->error));
}

0 个答案:

没有答案