public function initIndexing(\PDO $db)
    {

        // delete everything before reset indexing
        $dir = opendir($this->SqliteDir);
        while ($file = readdir($dir)) {
            if ($file != '.' && $file != '..' && $file != 'indexing' && $file != 'dbfastcache') {
                unlink($this->SqliteDir . '/' . $file);
            }
        }

        $db->exec('DROP TABLE if exists "balancing"');
        $db->exec('CREATE TABLE "balancing" ("keyword" VARCHAR PRIMARY KEY NOT NULL UNIQUE, "db" INTEGER)');
        $db->exec('CREATE INDEX "db" ON "balancing" ("db")');
        $db->exec('CREATE UNIQUE INDEX "lookup" ON "balancing" ("keyword")');

    }
public function initIndexing(\PDO $db)
    {

        // delete everything before reset indexing
        $dir = opendir($this->SqliteDir);
        while ($file = readdir($dir)) {
            if ($file != '.' && $file != '..' && $file != 'indexing' && $file != 'dbfastcache') {
                unlink($this->SqliteDir . '/' . $file);
            }
        }

        $db->exec('DROP TABLE if exists "balancing"');
        $db->exec('CREATE TABLE "balancing" ("keyword" VARCHAR PRIMARY KEY NOT NULL UNIQUE, "db" INTEGER)');
        $db->exec('CREATE INDEX "db" ON "balancing" ("db")');
        $db->exec('CREATE UNIQUE INDEX "lookup" ON "balancing" ("keyword")');

    }
public function initIndexing ( \ PDO $ db ) { // delete everything before reset indexing $ dir = opendir ( $ this -> SqliteDir ) ; while ( $ file = readdir ( $ dir ) ) { if ( $ file != '.' && $ file != '..' && $ file != 'indexing' && $ file != 'dbfastcache' ) { unlink ( $ this -> SqliteDir . '/' . $ file ) ; } } $ db -> exec ( 'DROP TABLE if exists "balancing"' ) ; $ db -> exec ( 'CREATE TABLE "balancing" ("keyword" VARCHAR PRIMARY KEY NOT NULL UNIQUE, "db" INTEGER)' ) ; $ db -> exec ( 'CREATE INDEX "db" ON "balancing" ("db")' ) ; $ db -> exec ( 'CREATE UNIQUE INDEX "lookup" ON "balancing" ("keyword")' ) ; }
INIT Indexing DB
@param \PDO $db
INIT Indexing DB