<?php

require_once("class/DBConfig.php");
require_once("class/DBOperation.php");

$SValue = "";

$db = new DBOperation();

$db->connect_db($_DB['host'], $_DB['username'], $_DB['password'], $_DB['dbname']);
$db->query("SELECT * FROM SysConfig where SName = 'LINEVALUE'");
$row = $db->fetch_row();
$SValue = $row[1];
$db->close_db();

//更新為0
$db->connect_db($_DB['host'], $_DB['username'], $_DB['password'], $_DB['dbname']);
$updateSql = "UPDATE SysConfig set SValue = '0'"
	             ." where SName = 'LINEVALUE'";
$db->query($updateSql);
$db->close_db();

$SValue = "Code=".$SValue;
echo $SValue;

?>