Location: PHPKode > scripts > Particle Whois > install/upgrade/from_1.0.2.php
<?php
require("../../includes/global.php");

$sql = "SELECT * FROM " . $dbprefix . "config WHERE config_name = 'versionint'";
$rec = $db->execute($sql);
$version = intval($rec->fields["config_value"]);

// check version
if (!($version == 3)){ die("You are not running version 1.0.1"); }

// run the update SQL
$sql = "UPDATE " . $dbprefix . "config SET config_value = '1.0.3' WHERE config_name = 'version'";
$db->execute($sql);

$sql = "UPDATE " . $dbprefix . "config SET config_value = 4 WHERE config_name = 'versionint'";
$db->execute($sql);

// and notify user
Header("Location: from_1.0.3.php");
?>
Return current item: Particle Whois