jmr3460 Posted June 5, 2009 Share Posted June 5, 2009 I an creating a database for a website I am rebuilding. The old site uses flat-file DB and I want to rebuild it with MySQL DB. I have created the following tables which I feel is okay. Customer information fields: (id,fname,lname,notes)tablename is name. (id,address,city,state,zipcode,country)table name is address. (id,faxphone,homephone,cellphone)table name is phone. (id,home-email,work-email,contact-email)table name is email. (id,car-id,car-make,car-model,car-year,car-mileage, car-condition,car-price,car-status(for-sale,sold),car-notes)table name is car I am having a small problem with the images table. I do not want to upload images to the table itself. What I want to do is upload to a folder and reference them in the table. My question is how do I setup my table. I am going to have thumbnails that corresponds to each image. There may be as many as 15 large images and 15 thumbs. Can someone please help me with this? Quote Link to comment https://forums.phpfreaks.com/topic/161001-images-table/ Share on other sites More sharing options...
Ken2k7 Posted June 5, 2009 Share Posted June 5, 2009 Upload it to the folder and just put the path URL of the file in the DB. Quote Link to comment https://forums.phpfreaks.com/topic/161001-images-table/#findComment-849746 Share on other sites More sharing options...
jmr3460 Posted June 6, 2009 Author Share Posted June 6, 2009 I have another question about these Data Base tables. The first field is the id that is what is going to be the identifier for individual car owners. I feel that all of them should be auto_increment. If I do this does this mean that every time I add something to the database the first I should make sure that there is something that refers to every table? I was going to add an image table with the URL to the photos. Since I was going to have 15 or more photos for each car owner do I need to create a field for each one or would it be better name the photos with the car owner id in the name. Which way would anyone suggest? Quote Link to comment https://forums.phpfreaks.com/topic/161001-images-table/#findComment-850351 Share on other sites More sharing options...
garymcgill77 Posted June 6, 2009 Share Posted June 6, 2009 hi i am working on a game script but i am haven some probs need search the db and see if the users have a set 8 imgs and if they have show them in a table on the game so if they have 1 it will only show the 1 and so on can someone help me as i am new to db work and finding this part hard many thanks gary Quote Link to comment https://forums.phpfreaks.com/topic/161001-images-table/#findComment-850430 Share on other sites More sharing options...
fenway Posted June 7, 2009 Share Posted June 7, 2009 Just iterate through the results. Quote Link to comment https://forums.phpfreaks.com/topic/161001-images-table/#findComment-851155 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.