ch13.1
This commit is contained in:
@@ -74,6 +74,5 @@ func (m *UserModel) Exists(id int) (bool, error) {
|
||||
stmt := `SELECT EXISTS(SELECT true FROM users WHERE id = ?)`
|
||||
|
||||
err := m.DB.QueryRow(stmt, id).Scan(&exists)
|
||||
|
||||
return exists, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user