Welcome Guest, Not a member yet? Register   Sign In
How to map upload.php and my table information
#6

[eluser]iainco[/eluser]
Well, I presume when the data is returned after upload, the different fields won't all be strings... so your array would look like this:

Code:
function saveUpload()
{
   $uploadResult = $this->_doUpload();

   $d = array(
     file_name      => $uploadResult['file_name'],
     file_type      => $uploadResult['file_type'],
     file_path      => $uploadResult['file_path'],
     full_path      => $uploadResult['full_path'],
     raw_name       => $uploadResult['raw_name'],
     orig_name      => $uploadResult['orig_name'],
     file_ext       => $uploadResult['file_ext'],
     file_size      => $uploadResult['file_size'],
     is_image       => $uploadResult['is_image'],
     image_width    => $uploadResult['image_width'],
     image_height   => $uploadResult['image_height'],
     image_type     => $uploadResult['image_type'],
     image_size_str => $uploadResult['image_size_str']
   );

   $this->load->model('upload/save_model');
   $this->save_model->saveUpload($d);
}

function _doUpload()
{
  //upload files
  return $uploadResult;
}

and the active record function will take care of the rest.


Messages In This Thread
How to map upload.php and my table information - by El Forum - 12-17-2008, 05:24 PM
How to map upload.php and my table information - by El Forum - 12-17-2008, 06:44 PM
How to map upload.php and my table information - by El Forum - 12-17-2008, 07:08 PM
How to map upload.php and my table information - by El Forum - 12-17-2008, 07:25 PM
How to map upload.php and my table information - by El Forum - 12-17-2008, 07:30 PM
How to map upload.php and my table information - by El Forum - 12-17-2008, 07:37 PM
How to map upload.php and my table information - by El Forum - 12-17-2008, 07:44 PM
How to map upload.php and my table information - by El Forum - 12-18-2008, 07:12 AM



Theme © iAndrew 2016 - Forum software by © MyBB