Coding Global Background
Coding Global

why does this not work

Archiviert 2 years ago
1 Nachrichten
1 Mitglieder
Erstellt 3 years ago
Aktualisiert 3 years ago
In Discord öffnen
X
xTTLegend
Verified
It works in my SQL Console in DBeaver, but this does not work and sets everything to zero.

i use modernc.org/sqlite

func calculateLikes() {
    _, err := db.Exec(`UPDATE notes SET Upvotes = (SELECT COUNT(*) FROM reactions WHERE reactions.Tags LIKE '%e","' || notes.ID || '%' AND reactions.Content = '+')`)
    if err != nil {
        log.Fatal(err)
    }
}

Antworten (1)