Welcome Guest, Not a member yet? Register   Sign In
Multiple MySql insert problem
#1

[eluser]polish[/eluser]
Hello All CI users! I need your help! I am writing my blog and at now I have a problem with adding tags to my news! When I will choose one tag all is ok, but if I will choose more then I have an error:

Code:
Error Number: 1054
Unknown column 'Array' in 'field list'
INSERT INTO 'newstags' ('ttags_id', 'nnews_id') VALUES (Array, '27')


I am using the model function for adding tags to news:

Code:
function tagi_add($data) {
return $this->db->insert('newstags', $data);
}

I need something like:
Code:
INSERT INTO 'newstags' ('ttags_id', 'nnews_id') VALUES ('1', '27')
INSERT INTO 'newstags' ('ttags_id', 'nnews_id') VALUES ('2', '27')
INSERT INTO 'newstags' ('ttags_id', 'nnews_id') VALUES ('5', '27')

for adding more than one tag with only one (normal or active records) query!

Any ideas???


Messages In This Thread
Multiple MySql insert problem - by El Forum - 06-18-2009, 09:24 AM
Multiple MySql insert problem - by El Forum - 06-18-2009, 09:34 AM
Multiple MySql insert problem - by El Forum - 06-18-2009, 09:36 AM
Multiple MySql insert problem - by El Forum - 06-18-2009, 09:54 AM
Multiple MySql insert problem - by El Forum - 06-18-2009, 10:13 AM
Multiple MySql insert problem - by El Forum - 06-18-2009, 10:38 AM
Multiple MySql insert problem - by El Forum - 06-18-2009, 11:01 AM
Multiple MySql insert problem - by El Forum - 06-18-2009, 11:58 AM
Multiple MySql insert problem - by El Forum - 06-18-2009, 05:45 PM



Theme © iAndrew 2016 - Forum software by © MyBB