Jump to content

whats the best way to set up an image database table


ccrevcypsys

Recommended Posts

something like

[pre]

customer        comments          image

---------        ---------          --------

cust_id  --+    id          +---  image_id

custname  +--  cust_id      |    image_url

eyc              image_id  ---+    title

                comment

                vote

Link to comment
Share on other sites

CREATE TABLE `image` (

  `id` int(11) NOT NULL auto_increment,

  `imagename` varchar(200) default NULL,        //name of the image

  `description` text,                                     //description text of the image

  `picture` varchar(200) default NULL,            // location of the image this can be used and pulled to display the image from its location as a variable

  `customername` varchar(200) default NULL,  // customer name

  `customerid` varchar(200) default NULL,    // unique customer id

  PRIMARY KEY  (`id`)

) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=0 ;

 

 

something Like this

Link to comment
Share on other sites

this is what i have so far.

 

Customer_images        Image_comments          Customer            FavPictures

----------------        -----------------          ----------          ----------------

id                --+  +-- id                          +--customer_id --+  id

image                        receive_cust            |  first_name      |  favImage

title                          comment                |  last_name      +--customer_id

story                        rating                      |    screenname

default                      customer_id        --+

visible                       

views                       

customer_id

 

Does this look good?

Link to comment
Share on other sites

receive cust is teh customer that is receiving the comment on their image.

Customer_images        Image_comments          Customer            FavPictures

----------------        -----------------          ----------          ----------------

id                --+  +-- id                          +--customer_id --+  id

image                        receive_cust            |  first_name      |  favImage

title                          comment                |  last_name      +--customer_id

story                        rating                      |    screenname

default                      customer_id        --+

visible                      comment_id

views                     

customer_id

 

 

like this

 

Oh and i didnt mean to double post i didnt know it automatically put this thread into the mysql help board. srry about that...!

Link to comment
Share on other sites

receive cust is teh customer that is receiving the comment on their image.

 

You have that already -- customer id in the image table, leaving

[pre]

Customer_images        Image_comments          Customer          FavPictures

----------------        -----------------      ----------      ----------------

id            --+  +-- image_id            +--customer_id --+  id

image                  comment_id          |  first_name    |  favImage

title                  comment              |  last_name    +-- customer_id

story                  rating              |  screenname

default                customer_id        --+

visible                     

views                     

customer_id

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.