Location: PHPKode > projects > Esvon Personals > esvon-personals/upgrades/v4_to_v4_09/upgrade405-406.php

// File to upgrade Esvon Classifieds from 4.0.5 to 4.0.6
// After use this, you can delete it


define('DB_UPGRADE', 1);

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

mysql_query('ALTER TABLE '.TBL_REG_CONFIRM.' ADD data text NOT NULL');
mysql_query('ALTER TABLE '.TBL_USER.' ADD hw_opts text NOT NULL');

if(!defined('TBL_HITS')) define('TBL_HITS',TBL_PREFIX.'hits');

mysql_query('CREATE TABLE '.TBL_HITS.' (
   lid mediumint(8) unsigned NOT NULL,
   hits int(11) unsigned NOT NULL,
   PRIMARY KEY (lid)

$amt = $db->one_data('SELECT COUNT(*) FROM '.TBL_HITS);
if($amt==0) $db->query('INSERT INTO '.TBL_HITS.' (lid, hits) (SELECT link_id, hits from '.TBL_AD.')');

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

Return current item: Esvon Personals