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

// File to upgrade Esvon Classifieds from 3.0.786 to 3.0.787
// 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("ALTER TABLE ".TBL_PAY_LOG." ADD gross decimal(6,2) DEFAULT '0.00' NOT NULL");

mysql_query("UPDATE ".TBL_PAY_LOG." SET gross=amount WHERE gross='0.00'");

if(hwModGetState('Credits')){

  mysql_query("ALTER TABLE ".hwModTable('Credits','log').
  " ADD gross decimal(9,2) DEFAULT '0.00' NOT NULL,".
  " ADD af_id mediumint(8) unsigned NOT NULL,".
  " ADD af_percent decimal(4,2) DEFAULT '0.00' NOT NULL,".
  " ADD KEY(af_id)");

  mysql_query("UPDATE ".hwModTable('Credits','log')." SET gross=fee WHERE gross='0.00'");

}

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

?>
Return current item: Esvon Personals