[eluser]Shella[/eluser]
Thanks for reply.
Unfortunately this is exactly my drama.
If I use this code:
Code:
$new_article_insert_data = array(
'title' => $this->input->post('title'),
'content' => $this->input->post('content'),
'image' => $this->upload->data['file_name'], //THIS IS A TRY
'id_category' => $this->input->post('category'),
'created_on' => $created_on,
);
I get this error:
Severity: Notice
Message: Undefined property: CI_Upload::$data
Filename: models/articles_model.php
...and if I use this:
Code:
$new_article_insert_data = array(
'title' => $this->input->post('title'),
'content' => $this->input->post('content'),
'image' => $this->upload->data('file_name'), //THIS IS ANOTHER TRY
'id_category' => $this->input->post('category'),
'created_on' => $created_on,
);
I get this error:
Severity: Notice
Message: Array to string conversion
Filename: mysql/mysql_driver.php
This last is trying to write a general "array" into the database:
Code:
INSERT INTO `articles` (`title`, `content`, `image`, `id_category`, `created_on`) VALUES ('Post Title', '\r\n Example data', Array, '44', '2012-06-14 15:19:28')
...I feel so dumb.. but I can't understand this logic...