Skip to content

Commit

Permalink
fix: sql syntax error
Browse files Browse the repository at this point in the history
  • Loading branch information
trim21 committed Oct 6, 2024
1 parent 67c6567 commit 73f71d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/collections/infra/mysql_repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -535,8 +535,8 @@ func (r mysqlRepo) reCountSubjectCollection(ctx context.Context, subjectID model
}

return r.q.Transaction(func(tx *query.Query) error {
err := tx.DB().WithContext(ctx).Exec(`
select interest_type as type, count(interest_type) as total from chii_subject_interests
err := tx.DB().WithContext(ctx).Exec(`select interest_type as type, count(interest_type) as total
from chii_subject_interests
where interest_subject_id = ?
group by interest_type
`, subjectID).Scan(&counts).Error
Expand Down

0 comments on commit 73f71d1

Please sign in to comment.