public function __construct(WorldEditArt $main, \mysqli $db) { parent::__construct($main); $this->db = $db; $this->db->query("CREATE TABLE IF NOT EXISTS selected_tools (\n\t\t\t\tplayer VARCHAR(32),\n\t\t\t\ttool_id TINYINT,\n\t\t\t\titem_id_type TINYINT,\n\t\t\t\titem_id_value SMALLINT,\n\t\t\t\titem_damage_type TINYINT,\n\t\t\t\titem_damage_value SMALLINT\n\t\t\t\t);"); }
public function __construct(WorldEditArt $main, $path) { parent::__construct($main); $this->db = new \SQLite3($main->getDataFolder() . $path); $this->db->query("CREATE TABLE IF NOT EXISTS selected_tools (\n\t\t\t\tplayer TEXT,\n\t\t\t\ttool_id INTEGER,\n\t\t\t\titem_id_type INTEGER,\n\t\t\t\titem_id_value INTEGER,\n\t\t\t\titem_damage_type INTEGER,\n\t\t\t\titem_damage_value INTEGER\n\t\t\t\t);"); }