<?php
namespace admin\factory;

class Newsletter {

  public function deleteEmail( $id )
  {
    global $db;

    $query = $db -> prepare( 'DELETE FROM pp_newsletter_emails WHERE id = :id' );
    $query -> bindValue( ':id' , $id , \PDO::PARAM_INT );
    $query -> execute();
    if ( $query -> rowCount() )
      return true;
    $query -> closeCursor();
    return false;
  }
}
