Browse Source

Make sql query little shorter

Vova Tkach 5 years ago
parent
commit
56b5fa9d1f
1 changed files with 6 additions and 6 deletions
  1. 6 6
      smtp.go

+ 6 - 6
smtp.go

@@ -50,16 +50,16 @@ func smtp_send(host, port, user, pass, subject, msg string, receivers []string)
 func smtp_prepare(db *sqlw.DB, conf *config.Config) {
 	rows, err := db.Query(
 		`SELECT
-			notify_mail.id,
-			notify_mail.email,
-			notify_mail.subject,
-			notify_mail.message
+			id,
+			email,
+			subject,
+			message
 		FROM
 			notify_mail
 		WHERE
-			notify_mail.status = 2
+			status = 2
 		ORDER BY
-			notify_mail.id ASC
+			id ASC
 		;`,
 	)
 	if err == nil {