Hello,
Here is my problem:
I have two tables :
- PLACES
- EQUIPEMENTS
PLACES
idplace (primary key)
name
address
EQUIPEMENTS
idequipement (primary key)
name
idplace
As you see an EQUIPEMENT always have a PLACE (idplace). But there is some PLACES without equivalent EQUIPEMENT (places with no corresponding equipement).
My Goal is to have a CRUD for the PLACES table. But i would like to be able to visualize if the PLACE is in the EQUIPEMENT table or not (by having the idequipement or 0 if no corresponding equipement).
I would like a CRUD like this :
idplace | name | idequipement
1 | myplace1 | 7
2 | myplace2 | 0
3 | myplace3 | 21
I know how i can do it the other way: having a CRUD for the EQUIPEMENT table and outputting an element of the PLACES table (using set_relation) but i want to do it for the other table.
I hope i'm clear...
Thank you!