I have 3 tables.
galery_images:
- id | int (primari key)
- image | varchar (the link on the server)
- tartalom | longtext
- galery | int
- order | int
galery:
- id | int (primari key)
- name | varchar
- tartalom | longtext
1-n relation with the images
galery_category:
- id | int (primari key)
- name | varchar
n-1 relation with the galeries
I'm asking for an image, then I would like to fetch all the relevant data in a single query. I need all the columns, aka, 1 image, 1 galery, and all the categories.
I'm using codeigniter, so I would also like to know what I'm facing while retrieving the categories.