options['verso'] <> $this->verso) $newversion = TRUE; // get list of tables and look for our tables in it $request = "SHOW TABLES;"; $rows = $wpdb->get_results($request); foreach($rows as $table) { foreach($table as $value){ if($value==$this->harvest_table) $harvest_table = true; } } if(!$harvest_table || $newversion){ $request = " CREATE TABLE $this->harvest_table ( source_id varchar(50) NOT NULL default '', harvest_date timestamp NOT NULL default '0000-00-00 00:00:00', imported tinyint(1) default '0', content longtext NOT NULL, PRIMARY KEY (source_id), KEY imported (imported) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 "; dbDelta($request); } ?>