You are here

function simplenews_count_spool in Simplenews 6

Same name and namespace in other branches
  1. 6.2 includes/simplenews.mail.inc \simplenews_count_spool()
  2. 7.2 includes/simplenews.mail.inc \simplenews_count_spool()
  3. 7 includes/simplenews.mail.inc \simplenews_count_spool()

Count data in mail spool table.

Parameters

integer $nid newsletter node id:

integer $vid newsletter revision id:

string $status email sent status:

Return value

array Mail message array

1 call to simplenews_count_spool()
simplenews_send_status_update in ./simplenews.module
Update newsletter sent status.

File

./simplenews.module, line 1916
Simplnews node handling, sent email, newsletter block and general hooks

Code

function simplenews_count_spool($nid, $vid, $status = SIMPLENEWS_SPOOL_PENDING) {
  return db_result(db_query("SELECT COUNT(*) FROM {simplenews_mail_spool} WHERE nid = %d AND vid = %d AND status = %d", $nid, $vid, $status));
}