2017-10-05 76 views
0

更改我的gmail密碼後出現此錯誤。它在工作之前。發生數據庫錯誤:codeigniter中的錯誤編號1054未知列

數據庫發生錯誤

Error Number: 1054 Unknown column 'g-recaptcha-response' in 'field list'

INSERT INTO tblsb_userqueries (project_id , username , phone , message , g-recaptcha-response) VALUES ('0', 'demo', '0000', 'test', '03AJzQfVCDrIod2TLu')

文件名:型號/ Common_model.php 行號:8

這是我的PHPMailer的代碼:

<?php 
require 'application/third_party/email/PHPMailerAutoload.php'; 

$mail = new PHPMailer; 

//$mail->isSMTP();          // Set mailer to use SMTP 
$mail->Host  = 'smtp.gmail.com';      // Specify main and backup server 
$mail->SMTPAuth = true;        // Enable SMTP authentication 
$mail->Username = '[email protected]';     // SMTP username 
$mail->Password = 'Demo123#';    // SMTP password 
$mail->SMTPSecure = 'ssl';       // Enable encryption, 'ssl' also accepted 
$mail->Port = 587;         //Set the SMTP port number - 587 for authenticated TLS 
$mail->setFrom('[email protected]', 'header name');  //Set who the message is to be sent from 
$mail->addAddress('d[email protected]'); // Add a recipient 
$mail->WordWrap = 50;         // Set word wrap to 50 characters 
$mail->isHTML(true);         // Set email format to HTML 

$mail->Subject = 'Here is the subject'; 
$mail->Body = 'This is the HTML message body <b>in bold!</b>'; 
$mail->AltBody = 'This is the body in plain text for non-HTML mail clients'; 

//Read an HTML message body from an external file, convert referenced images to embedded, 
//convert HTML into a basic plain-text alternative body 
$mail->msgHTML('Hi, This is my test email'); 

if(!$mail->send()) { 
    echo 'Message could not be sent.'; 
    echo 'Mailer Error: ' . $mail->ErrorInfo; 
    exit; 
} 

echo 'Message has been sent'; 
?> 
+0

無論你的表'tblsb_userqueries'這個領域'G-驗證碼,response'? – KMS

+0

您可以張貼在那裏你用這個查詢代碼 –

+0

是,這一領域在表中。謝謝@KMS。我的聯繫形式的前一天是完全正常的,但今天我已經改變了我的Gmail密碼,我力後得到的收件箱中的電子郵件從我的網站的聯繫方式。 – UDigi

回答

0

試試下面的變化,需要更改表字段名g_recaptcha_response

INSERT INTO tblsb_userqueries (`project_id`, `username`, `phone`, `message`, `g_recaptcha_response`) VALUES ('0', 'demo', '0000', 'test', '03AJzQfVCDrIod2TLu') 
相關問題