title: Codeigniter: preferred approach to store images data in a database
body: <p>I need to store images data in a database. I'm uploading images to a server and then, of course, I need to retrieve them from the database. I know that in the database I should only store just datas leaving the actual files to the filesystem so I'm trying to think which one may be the best way to save those datas. </p>
  
  <p>What's bothering me the most is choosing a naming scheme. In the database I'll just have a <code>filename</code> column, where to store just the filename plus the extension. No path, so I can config it in my application. So: what shall I use for the filename? I'd like to keep a meaningful name, so it would be cool to keep the photo title, or at least a part of it. But to ensure uniqueness which one could be the best approach?</p>
  
  <p>I know Codeigniter has a string helper, but I also read about using the php function uniqid. Then I can attach the id to the picture name.</p>
  
  <p>What do you suggest?</p>