Update SQL query to exclude characters without associated user IDs: Modify the QUERY_GET_REGION_CHARACTERS to ensure only characters with a valid user_id are selected, enhancing data integrity and relevance in region-specific character retrieval.
This commit is contained in:
@@ -709,7 +709,7 @@ UPDATE falukant_data."character" SET health = $1 WHERE id = $2;
|
|||||||
"#;
|
"#;
|
||||||
|
|
||||||
pub const QUERY_GET_REGION_CHARACTERS: &str = r#"
|
pub const QUERY_GET_REGION_CHARACTERS: &str = r#"
|
||||||
SELECT id, health FROM falukant_data."character" WHERE region_id = $1 AND health > 0;
|
SELECT id, health FROM falukant_data."character" WHERE region_id = $1 AND health > 0 AND user_id IS NOT NULL;
|
||||||
"#;
|
"#;
|
||||||
|
|
||||||
pub const QUERY_DELETE_DIRECTOR: &str = r#"
|
pub const QUERY_DELETE_DIRECTOR: &str = r#"
|
||||||
|
|||||||
Reference in New Issue
Block a user