CodeIgniter Forums
DB design and file uploading - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Development & Programming (
+--- Thread: DB design and file uploading (/showthread.php?tid=10026)

DB design and file uploading - El Forum - 07-16-2008


I'm midway through building an app which needs a simple CMS to handle text and images.

First of all the text. The website promotes a series of music gigs for a festival. I want a system that can

- give a time and place
- add as many number of bands as needed

I want the markup to be

<li class="rss-item">
  <h4 class="pryd">Saturday 04/08, 9pm</h4>
  <h4 class="ble">Solus/Bar Solus</h4>
  <ul class="artists">
    <li>Cate Le Bon</li>
    <li>Gwyneth Glyn</li>
    <li>The Gentle Good</li>
    <li>Georgia Ruth Williams</li>

The problem I have is how to put this info in a table. Do I need a Artists table like this?
gig_id | artist_name

or is there an easier/better way? It also needs to be bilingual.

I'll also need a way to upload images and display them - I'm fairly confident about this but any advice on librares, helpers etc is welcome.

The website is

Thanks for your help,


DB design and file uploading - El Forum - 07-17-2008

Ok...let's be more specific.

I want to upload images and store the data in a db.


-upload the image.
-check if it's portrait or landscape
-resize it to 315*420 / 420*315, if not already that size. This may need a crop as well, in case the proprtions are incorrect.
-create a thumbnail, 47*47, so this also needs a crop either before or after resizing (after, i should think, less CPU cycles?)
-put these two images in their directories, root/gallrey and root/gallery/thumbs
-put the data (name, portrait/landscape, location) in a db table.

The code in this thread looks like a good place to start,

Is the above sequence the best one? Any tips?