Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6149597
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:28:47+00:00 2026-05-23T19:28:47+00:00

I am recieving an error in my Codeigniter Model which is inserting a single

  • 0

I am recieving an error in my Codeigniter Model which is inserting a single row in a MySQL table. Here is a description of the error

A Database Error Occurred

Error Number: 1054

Unknown column 'value2' in 'field list'

INSERT INTO `tablename` (`column1`, `column2`) VALUES (value1, value2)

Filename: path\to\DB_driver.php

Line Number: 330

Both the columns are varchar columns.Does anyone know of this error?

The error message is verbatim copy pasted. My Controller code is as follows:

$deviceID=$xmlString->deviceID;
$appType=$xmlString->appType;
$data = array( 'deviceIdentifier' => $deviceID, 'installType'=>$appType );
$this->device_model->insert_new_device($data);

My model code is as follows

class device_model extends CI_Model {
    function insert_new_device($lData) { 
        $this->db->insert('devices', $lData);
        return $this->db->insert_id();
    } 
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T19:28:48+00:00Added an answer on May 23, 2026 at 7:28 pm

    Based on the error reported by MySQL: value1 and value2 should be within single quotes as 'value1' and 'value2'.

    UPDATE: The reason there are no quotes around the values in the query seems to be because the values that are being pulled from the XML are not exactly strings. Typecasting the results to string should ensure that the query parser quotes the values.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am recieving an error: Notice: Undefined variable: content in C:\wamp\www\includes\imdbgrabber.php on line 17
Im not sure why I am recieving this error, and I'm unable to track
I'm recieving the following error on trying to run an append query in access.
I'm recieving the following error message, A public action method 'RenderMenu' was not found
I'm using the codeigniter framework, I'm retrieving data from the database in the form
I am recieving the error: Deprecated: Function eregi() is deprecated in C:\wamp\www\registration\class.register.php on line
I currently have a NHibernateHelper class which creates a session factory. I keep recieving
Receiving Error message when performing Update Statement, but database is being updated. Error: You
I kept recieving error 12029 (ERROR INTERNET CANNOT CONNECT, The attempt to connect to
I am recieving errors like this one: _mysql_exceptions.ProgrammingError: (1064, You have an error in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.