รายละเอียดของการตอบ ::
<?php
include("conf.php");
$dbConf = new BPConf();
$databaseURL = $dbConf->get_databaseURL();
$databaseUName = $dbConf->get_databaseUName();
$databasePWord = $dbConf->get_databasePWord();
$_SESSION['databaseURL']=$databaseURL;
$_SESSION['databaseUName']=$databaseUName;
$_SESSION['databasePWord']=$databasePWord;
//$conn=odbc_connect('iConnect','wlm','wlm') or die ("Can not connect server");
$conn = odbc_connect($databaseURL,$databaseUName,$databasePWord) or die ("Can not connect server");
?>
//Insert
$sql = "insert into tmpdetail (id, name, surname) values ('001', 'ธีระเดช', 'วงศ์พัวพันธ์')";
$query = odbc_exec($conn, $sql);
if (!$query) {
odbc_rollback($conn);
} else {
odbc_commit($conn);
}