public function __construct($title, $user_id, $date_created = NULL)
 {
     parent::__construct($date_created);
     $this->fields["title"] = array($title, "VARCHAR(512)");
     $this->fields["user_id"] = array($user_id, "INT(11), FOREIGN KEY(user_id) REFERENCES user_models(id) ON DELETE CASCADE");
     parent::construct_if_not_exists();
 }
 public function __construct($page_id, $q_and_a, $date_created = NULL)
 {
     parent::__construct($date_created);
     $this->fields["page_id"] = array($page_id, "INT(11), FOREIGN KEY(page_id) REFERENCES page_models(id) ON DELETE CASCADE");
     $this->fields["q_and_a"] = array($q_and_a, "TEXT");
     parent::construct_if_not_exists();
 }
 public function __construct($page_text, $adventure_id, $img_url, $date_created = NULL)
 {
     parent::__construct($date_created);
     $this->fields["page_text"] = array($page_text, "TEXT");
     $this->fields["adventure_id"] = array($adventure_id, "INT(11), FOREIGN KEY(adventure_id) REFERENCES adventure_models(id) ON DELETE CASCADE");
     $this->fields["image_url"] = array($img_url, "VARCHAR(512)");
     parent::construct_if_not_exists();
 }
 public function __construct($first_name, $last_name, $email, $password, $last_login, $failed_login_attempts = 0, $date_created = NULL)
 {
     parent::__construct($date_created);
     $this->fields["first_name"] = array($first_name, "VARCHAR(255)");
     $this->fields["last_name"] = array($last_name, "VARCHAR(255)");
     $this->fields["email"] = array($email, "VARCHAR(255)");
     $this->fields["password"] = array(MD5($password), "VARCHAR(512)");
     $this->fields["last_login"] = array($last_login, "TIMESTAMP");
     $this->fields["failed_login_attempts"] = array($failed_login_attempts, "INT(11)");
     parent::construct_if_not_exists();
 }