30 lines
638 B
PHP
Raw Normal View History

2016-08-24 15:46:06 +02:00
<?php
class AntPopOverEmail extends ObjectModel{
public $id_ant_popover;
public $email;
public $date_add;
/**
* @var type
*/
public static $definition = array(
'table' => 'ant_popover_email',
'primary' => 'id_ant_popover',
'fields' => array(
'email' => array(
'type' => ObjectModel::TYPE_STRING,
'required' => TRUE,
'validate' => 'isEmail'
),
'date_add' => array(
'type' => ObjectModel::TYPE_STRING,
)
)
);
public static function getByEmail($email){
return Db::getInstance()->getValue('SELECT COUNT(*) FROM `'._DB_PREFIX_.'ant_popover_email` WHERE `email` LIKE \''.$email.'\'');
}
}