Styleeees
This commit is contained in:
@@ -169,7 +169,7 @@ app.post("/getPlayers", authenticate, async (req, res) => {
|
||||
.input("two", sql.VarChar, positions[1])
|
||||
.input("three", sql.VarChar, positions[2])
|
||||
.input("four", sql.VarChar, positions[3])
|
||||
.query(`SELECT p.PlayerID, p.PlayerName, c.TotalValue, p.Team, p.Position FROM Player AS p JOIN Contract AS c ON p.PlayerID = c.PlayerID WHERE p.PlayerName LIKE '%' + @query + '%' AND p.Position IN (@one, @two, @three, @four);`);
|
||||
.query(`SELECT p.PlayerID, p.PlayerName, c.TotalValue, p.Team, p.Position FROM Player AS p JOIN Contract AS c ON p.PlayerID = c.PlayerID WHERE p.PlayerName LIKE '%' + @query + '%' AND p.Position IN (@one, @two, @three, @four) ORDER BY p.PlayerName;`);
|
||||
|
||||
res.status(200).json({ query: player, matches: result.recordset });
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user