30 lines
638 B
PHP
30 lines
638 B
PHP
<?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.'\'');
|
|
}
|
|
} |