Files
website/storage/badgecounts.go
2025-04-01 10:19:56 +01:00

12 lines
404 B
Go

package storage
// "database/sql"
// // Get all for count
// var count int
// db.Get(&count, `SELECT COUNT(*) FROM user_notifications WHERE user_id = ? AND is_read = FALSE`, userID)
// // Then get the top 15 for display
// var notifications []Notification
// db.Select(&notifications, `SELECT * FROM user_notifications WHERE user_id = ? AND is_read = FALSE ORDER BY created_at DESC LIMIT 15`, userID)