lotus-1 / Lotus-Events

An app used to add and update events for Lotus!
0 stars 1 forks source link

More advanced sql queries #11

Open MynahMarie opened 5 years ago

MynahMarie commented 5 years ago

Good job in separating your queries in different functions! The only thing is that I would like to see a little more advance sql queries instead of each time selecting everything form each table:

https://github.com/lotus-1/Lotus-Events/blob/086debd78436528ec3ada2efff72e93c48bf7852/src/queries/getEvents.js#L20

I would like to see you select an entry in the database according to some condition, for example: SELECT * FROM comments WHERE user_id = <some user id>

You don't want to all the time be selecting everything without any conditions. What would happen if you had hundreds of entries in your database? You need to filter the information you want to receive somehow.