Location: PHPKode > projects > Esvon Personals > esvon-personals/upgrades/v3_to_v4/upgrade312-313.php
<?php

// File to upgrade Esvon Classifieds from 3.0.788 to 3.0.790
// After use this, you can delete it

//*********************************************

define('DB_UPGRADE', 1);

if(!defined('SITE_PATH')){
  if(!file_exists('./inc/application.php')) die("File Not Found: application.php");
  require_once './inc/application.php';
}

mysql_query("CREATE TABLE ".TBL_TPL." (
   id smallint(5) unsigned NOT NULL auto_increment,
   fname varchar(40) NOT NULL,
   mod varchar(64) NOT NULL,
   fset varchar(40) NOT NULL,
   data text NOT NULL,
   PRIMARY KEY (id),
   UNIQUE (fname,mod,fset))");

mysql_query("ALTER TABLE ".TBL_CAT." ADD meta_k text NOT NULL");
mysql_query("ALTER TABLE ".TBL_CAT." ADD meta_d text NOT NULL");

if(hwModGetState('Multi_Lang')){

  mysql_query("CREATE TABLE ".hwModTable('Multi_Lang','data')." (
  id varchar(40) NOT NULL,
  lang_id varchar(10) NOT NULL,
  phrase varchar(255) NOT NULL,
  PRIMARY KEY (id,lang_id))");

  mysql_query("ALTER TABLE ".hwModTable('Multi_Lang','language')." ADD charset varchar(30) NOT NULL");
  mysql_query("ALTER TABLE ".hwModTable('Multi_Lang','language')." ADD locale varchar(100) NOT NULL");
  mysql_query("ALTER TABLE ".hwModTable('Multi_Lang','language')." ADD date_fmt varchar(30) NOT NULL");
  mysql_query("ALTER TABLE ".hwModTable('Multi_Lang','language')." ADD date_time_fmt varchar(30) NOT NULL");
  mysql_query("ALTER TABLE ".hwModTable('Multi_Lang','language')." ADD date_entry_fmt varchar(30) NOT NULL");
  mysql_query("ALTER TABLE ".hwModTable('Multi_Lang','language')." ADD meta_k text NOT NULL");
  mysql_query("ALTER TABLE ".hwModTable('Multi_Lang','language')." ADD meta_d text NOT NULL");

}

echo 'Esvon Classifieds Tables Updated, Ok.. ('.basename(__FILE__).')';


?>
Return current item: Esvon Personals