php - mysql - design a table with a column that can have multiple values -


i have table news.

id | title   | text    | date    | image ---------------------------------------------------------- 1     hi      r u ok?   5/5/2013   image1.jpg 2   bye  bye bye   6/6/2013   image2.jpg, image3.jpg 

and every piece of new can have more image, number of images. i've tried store in 1 column several images (like example), don't know how display news website.

title text images date 

how can foreach or while?

the best practice use second table use foreign key id of current table , image path image.


Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -