I'm trying to insert two rows but the id of every row is in the same array, how can I insert correctly?
Because I tried by this way but only insert me the first id.
$sql = "
INSERT INTO cars(car, price, createdDate, createdBy)
VALUES (".$this->db->escape($ids).",
".$this->db->escape($price).",
NOW(),
".$this->session->userdata('admin_id').")";
mysql_query($sql);
echo ($sql);
This is what I get:
INSERT INTO cars (car, price, createdDate, createdBy)
VALUES ('217450,217449', '15', NOW(), 150)
In car I want to insert the price, createdDate and createdBy on the two car Ids 217450,217449.
Thank you in advance.