我有部份查詢,再次聲明,我試圖通過從POP3帳戶mysql數據庫:錯誤與庫MySQLi INSERT
mysqli_query($con,"INSERT INTO procesa_emails (body_mail, uid_message, fecha, from, to, subject, message_id) VALUES ('".mysqli_real_escape_string($con,htmlentities(str_replace("'","",str_replace('"','',$message))))."','".mysqli_real_escape_string($con,htmlentities($uid_mess))."','".mysqli_real_escape_string($con,htmlentities($fecha))."','".mysqli_real_escape_string($con,htmlentities($from))."','".mysqli_real_escape_string($con,htmlentities($to))."','".mysqli_real_escape_string($con,htmlentities($subject))."','".mysqli_real_escape_string($con,htmlentities($mui))."')")or die(mysqli_error($con));
但它返回我:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'from, to, subject, message_id)
我試着用str_replace函數( 「'」,「」,str_replace('''。''))但是它也行不通
可能是一個愚蠢的問題,但你可能mispell'procesa_emails'?也許'process_emails'? –
procesa_emails是數據庫名稱 – Darkness
好吧,只是想我會問。 's'和'a'在關鍵字上是相鄰的,從來不知道。 –