Welcome Guest, Not a member yet? Register   Sign In
active record insert issue
#1

[eluser]Matrices[/eluser]
I'm trying to insert some info into a table. Here's my code:
Code:
$data = array(
        'client_id'    => $input['client_id'],
        'title'        => $input['title'],
        'slug'         => $input['slug'],
        'desc'         => $input['desc'],
        'date_create'  => now()
      );
  
$this->db->insert('proof_albums', $data);

and I'm receiving a MySQL error back:
Quote:A Database Error Occurred
Error Number: 1064

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 'desc, date_create) VALUES ('7', 'test', 'test-test', 'testest', 1277316812)' at line 1

INSERT INTO proof_albums (client_id, title, slug, desc, date_create) VALUES ('7', 'test', 'test-test', 'testest', 1277316812)

I'm not quite sure why this is. Can anyone point me in the right direction?


Messages In This Thread
active record insert issue - by El Forum - 06-23-2010, 12:23 PM
active record insert issue - by El Forum - 06-23-2010, 12:41 PM
active record insert issue - by El Forum - 06-23-2010, 12:58 PM
active record insert issue - by El Forum - 06-23-2010, 01:32 PM
active record insert issue - by El Forum - 06-23-2010, 01:32 PM



Theme © iAndrew 2016 - Forum software by © MyBB