Possible Duplicate:
How to Join three tables
I have 4 tables :
- folder (id_folder,name)
- subfolder(id_subfolder,id_folder,name,othercolumn,…)
- piece(id_piece,id_subfolder,id_folder)
- image(id_image,id_piece,name,..)
How can I get all the contents of one folder (“id_folder=1” for example)?
You would
JOINyour tables, something like this:If you need help learning
JOINsyntax, then there is a great Visual Explanation of SQL Joins that will help.