This commit is contained in:
CHIEFSOFT\ameye
2025-01-11 14:38:26 -05:00
parent 6a285ee2d8
commit 2f6be8440c
+1 -1
View File
@@ -647,7 +647,7 @@ def recent_actions(current_user):
# RECENT_ACTIONS = "SELECT * FROM members_actions WHERE member_id = " + user_id + " ORDER by id DESC LIMIT 4"
# RECENT_ACTIONS = "SELECT * FROM members_actions WHERE member_id::text = %s ORDER by id DESC LIMIT 4"
# print(user_id)
RECENT_ACTIONS = f"SELECT id AS no,action_label AS description,added AS date,status FROM members_actions WHERE member_id = {user_id} ORDER by id DESC LIMIT 4"
RECENT_ACTIONS = f"SELECT id AS no,action_label AS description,added::text AS date,status FROM members_actions WHERE member_id = {user_id} ORDER by id DESC LIMIT 4"
actionVal = (user_id)
with connection.cursor(cursor_factory=psycopg2.extras.DictCursor) as cursor:
cursor.execute(RECENT_ACTIONS)