dsjgk330337 2017-10-05 05:35
浏览 78

发生数据库错误:codeigniter中的错误号1054未知列

I am getting this error after changed my gmail password. It was working before.

A Database Error Occurred

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')

Filename: models/Common_model.php Line Number: 8

This is my PHPMailer code:

<?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 = 'demo@gmail.com';                   // 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('noreply@gmail.com', 'header name');     //Set who the message is to be sent from
$mail->addAddress('demo1@gmail.com');  // 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';
?>
  • 写回答

1条回答 默认 最新

  • dongye1942 2017-10-05 18:29
    关注

    try below changes, need to change table field name to g_recaptcha_response

    INSERT INTO tblsb_userqueries (`project_id`, `username`,  `phone`, `message`, `g_recaptcha_response`) VALUES ('0', 'demo', '0000', 'test', '03AJzQfVCDrIod2TLu')
    
    评论

报告相同问题?

悬赏问题

  • ¥20 怎么用dlib库的算法识别小麦病虫害
  • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启
  • ¥15 java写代码遇到问题,求帮助
  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?
  • ¥15 加热介质是液体,换热器壳侧导热系数和总的导热系数怎么算