<?php
# ----------------------------------------------------------------------------------
# Erased currencies must be added as disabled
# ----------------------------------------------------------------------------------
$query = "SELECT COUNT(*) FROM `currency` WHERE `abrv` = 'ZAR' ";
$result = mysql_query($query) or die("ERROR in query: $query");

list($exist) = mysql_fetch_row($result);

if(!$exist){
    $query2 = "INSERT INTO `currency` (`name`, `symbol`, `abrv`, `alignment`, `precision`, `rate`, `enabled`) "
             ."VALUES ('South African Rand', 'R', 'ZAR', 'left', 2, 1, 0)";
    mysql_query($query2) or die("ERROR in query: $query");
}
?>
