-2
ifadesi hazırladım Şimdi son zamanlarda mysqli'den mysqli'ye geçtim, şimdi kodlarımı mysqli olarak yeniden biçimlendirmeye çalışıyorum.mysqli
Lütfen bu ifadelerde yanlış olanları bana yönlendirin.
Kodu:
<?php
include_once 'dbconnect.php';
$sample ='sample123'; // these are dummy values
$orecip='admin'; // these are dummy values
$omessage='test'; // these are dummy values
$date = date('Y-m-d'); // these are dummy values
$read='yes'; // these are dummy values
$read1='no'; // these are dummy values
$otitle='test'; // these are dummy values
$insert = $MySQLi_CON->query("INSERT INTO messages (user_from, user_to, title, message, date, user_from_read, user_to_read)
VALUES($sample, $orecip, $otitle ,$omessage,$date,$read,$read1)");
print '<h3>Insert Multiple records</h3>';
if($insert){
//return total inserted records using mysqli_affected_rows
print 'Success! Total ' .$MySQLi_CON->affected_rows .' rows added.<br />';
}else{
die('Error : ('. $MySQLi_CON->errno .') '. $MySQLi_CON->error);
}
?>
hatalar:
Hata: DEĞERLER kısmında (1054) 'alanına listesi'
http://php.net/manual/en/mysqli.error.php sorgunuzda. Burada oldukça açık; belirtilmemiş dizeler. –