'privatesales_alertmail_category', 'primary' => 'id_privatesales_alertmail_category', 'fields' => array( 'id_privatesales_category' => array( 'type' => ObjectModel :: TYPE_INT, 'required' => TRUE, 'validate' => 'isInt' ), 'id_user' => array( 'type' => ObjectModel :: TYPE_INT, 'validate' => 'isInt' ), 'email' => array( 'type' => ObjectModel :: TYPE_STRING, 'required' => TRUE, 'validate' => 'isEmail' ) ) ); public static function isAlertedCategory($id_customer,$id_category){ if(!$id_customer || !$id_category) return false; if ($row = Db::getInstance()->getRow(' SELECT `id_privatesales_alertmail_category` FROM `' . _DB_PREFIX_ . 'privatesales_alertmail_category` WHERE `id_privatesales_category` = ' . (int)$id_category . ' AND `id_user` = ' . (int)$id_customer . ' ') ) { return (int)$row['id_privatesales_alertmail_category']; } return FALSE; } }