Many of the SQL statements have inconsistent casing. For example, some use uppercase keywords, some use lower case keywords, some use a mixture:
|
dbConnection.query(`SELECT * FROM users WHERE usaname='${name}'`, (err, res) => { |
|
dbConnection.query(`SELECT topics.title ,users.name from topics inner join users on topics.user_id = users.id where topics.user_id ='${id}'`, (err, res) => { |
|
dbConnection.query(`SELECT cards.content, cards.likes from cards inner join topics on cards.topics_id = topics.id inner join topic_likes on cards.likes = topic_likes.likes`, (err, res) => { |
You should try to be consistent, otherwise some SQL keywords could be mistaken by the reader for identifiers (e.g. column names). I tend to use uppercase for keywords, but it's mostly a stylistic choice.
Many of the SQL statements have inconsistent casing. For example, some use uppercase keywords, some use lower case keywords, some use a mixture:
Nerd-s-flashCards/src/queries/db_functions.js
Line 7 in 8febfae
Nerd-s-flashCards/src/queries/db_functions.js
Line 107 in 8febfae
Nerd-s-flashCards/src/queries/db_functions.js
Line 143 in 8febfae
You should try to be consistent, otherwise some SQL keywords could be mistaken by the reader for identifiers (e.g. column names). I tend to use uppercase for keywords, but it's mostly a stylistic choice.