Esempio n. 1
0
 public function __construct(array $data = array())
 {
     parent::__construct($data);
     $this->db = Database::db();
     $this->_collection_filters = array();
     $this->_order_by = null;
     if (!isset(self::$_create_flags[__CLASS__]) || !self::$_create_flags[__CLASS__]++) {
         $this->_create();
     }
 }
Esempio n. 2
0
 protected function _create()
 {
     // VISITAS
     //  - id        : 12871781
     //  - uri       : sem/concurso-traje-buceo.html
     //  - template  : sem-concursotrajebuceo-201503
     //  - variation : A
     //  - conversion: lead
     Database::db()->exec("\n\t\t\tCREATE TABLE IF NOT EXISTS visits (\n\t\t\t\tid INTEGER PRIMARY KEY NOT NULL,\n\t\t\t\turi text NOT NULL,\n\t\t\t\ttemplate text NOT NULL,\n\t\t\t\tvariation text NOT NULL,\n\t\t\t\tconversion text NULL\n\t\t\t)\n\t\t");
 }
Esempio n. 3
0
 /**
  *
  */
 protected function _create()
 {
     Database::db()->exec("\n\t\t\tCREATE TABLE IF NOT EXISTS hooks (\n\t\t\t\tid INTEGER PRIMARY KEY NOT NULL,\n\t\t\t\thook text NOT NULL,\n\t\t\t\tconfig text NOT NULL,\n\t\t\t\ttemplate text NOT NULL,\n\t\t\t\tstatus INTEGER NOT NULL\n\t\t\t)\n        ");
 }
Esempio n. 4
0
 /**
  *
  */
 protected function _create()
 {
     // VISTAS Y CONVERSIONES POR PLANTILLA/VARIACIÓN
     //  - template      : sem-concursotrajebuceo-201503
     //  - variation     : A
     //  - views         : 436
     //  - conversions   : 5
     Database::db()->exec("\n\t\t\tCREATE TABLE IF NOT EXISTS stats (\n\t\t\t\ttemplate text NOT NULL,\n\t\t\t\tvariation text NOT NULL,\n\t\t\t\tviews integer NOT NULL,\n\t\t\t\tconversions integer NOT NULL\n\t\t\t)\n\t\t");
 }