Welcome Guest, Not a member yet? Register   Sign In
[SOLVED] Syntax Error: You have an error in your SQL syntax;
#14

[eluser]jonez[/eluser]
Never seen an insert written that way, SET is usually used with updates. Inserts are typically written like this;

Code:
INSERT INTO mytable (columna, columnb) VALUES ('one', 'two');

I'd recommend using active record in this case since it will auto escape your data.

Code:
$this->db->insert( 'mytable', array( 'columna' => 'one', 'columnb' => 'two' ) );


Messages In This Thread
[SOLVED] Syntax Error: You have an error in your SQL syntax; - by El Forum - 06-26-2014, 05:39 AM



Theme © iAndrew 2016 - Forum software by © MyBB