Welcome Guest, Not a member yet? Register   Sign In
query builder (insert) suggestion

Unless I am using this wrong (first CI site build), this produces a db error, asking to use the set() method:

PHP Code:
$dummy_data = array();

Where this does not produce an error:

PHP Code:
$this->db->query("INSERT INTO 'mytable' () VALUES()"); 

You may ask.. "Why insert into a table with no data?"...

I have a database that is one field, which is an auto-incrementing ID field. I do a blank insert, then grab the new ID with:

PHP Code:


Theme © iAndrew 2016 - Forum software by © MyBB