Skip to content

Commit

Permalink
Fixing SQL query
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyam3004 committed Mar 14, 2023
1 parent f8e5c91 commit c33d330
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ChatApp.Infrastructure/Queries/UserQueries.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public static class UserQueries
"WHERE UserId = @UserId";

public static readonly string CountOfUsersByUsername = "SELECT COUNT(*) FROM [ChatUser] " +
"WHERE RoomId = @RoomId AND Username = @Username";
"WHERE RoomId = @RoomId AND Username = @Username AND HasLeft = 'FALSE'";

public static readonly string UpdateUserStatus = "UPDATE [ChatUser] " +
"SET HasLeft = 'TRUE' WHERE UserId = @UserId";
Expand Down

0 comments on commit c33d330

Please sign in to comment.