I'm designing a small application using pure PHP. I'm not going to use frameworks. This is my ER diagram.
Users can add one or more user notes. And each note can be tagged by user. Users can search by note title, content and also note tags.
- When I'm going to show all notes in one page, I can get user details and note details in one query. But after that I need to retrieve tags using another query in a foreach loop. Is this good way to implement this?
- I have seen when I'm using some frameworks they retrieve data in a collection of array. How can I achieve this?
- I'm trying to give sorting feature using tags. I'm confusing that how do I sort notes using set of tags? Is there any way to achieve this also?