Helper\Option::delete PHP Method

delete() public static method

public static delete ( $k )
    public static function delete($k)
    {
        $sql = "DELETE FROM options WHERE k=:k";
        $statement = DB::getInstance()->prepare($sql);
        $statement->bindParam(":k", $k);
        $statement->execute();
    }

Usage Example

Example #1
0
 /**
  * @JSON
  */
 public function reset()
 {
     $result = array('error' => 0, 'message' => '重置 ' . $_POST['mail_type'] . ' 邮件配置项完成');
     Option::delete('Mail_' . $_POST['mail_type']);
     Option::init();
     return $result;
 }