Fixed database query

Just a little mistake…