public function excluir(Membro $obj) { $strSQL = "DELETE FROM ADM_HMEC_HISTORICO_MEMBROS_ESTADOS_CIVIS "; $strSQL .= "WHERE PES_ID = '" . $obj->getId() . "'"; if (DbMysql::getInstance()->update($strSQL)) { return true; } else { return false; } }
} /** * close db connection * @return bool whether close connection successful */ function close() { return mysql_close($this->conn); } /** * Character encoding conversion * @return character */ // function setCharsetEncoding($data){; // $data = ($data,'iso8859-1','utf-8'); // return $data; // } /** * display error message and exit * @param string $message * @param string $sql, sql statememt */ function halt($message = '', $sql = '') { echo $message; echo "The method or operation is not implemented."; exit; } } $dbmgr = DbMysql::getInstance(); $myconn = $dbmgr->connect($CONFIG['database']['host'], $CONFIG['database']['user'], $CONFIG['database']['psw'], $CONFIG['database']['database']);
$reqHandler->setParameter("transport_desc", ""); //物流说明 $reqHandler->setParameter("trans_type", "1"); //交易类型 $reqHandler->setParameter("agentid", ""); //平台ID $reqHandler->setParameter("agent_type", ""); //代理模式(0.无代理,1.表示卡易售模式,2.表示网店模式) $reqHandler->setParameter("seller_id", ""); //卖家的商户号 //请求的URL $reqUrl = $reqHandler->getRequestURL(); $debugInfo = $reqHandler->getDebugInfo(); //---保存数据库操作 require_once "classes/dbmysql.class.php"; $oDb = DbMysql::getInstance($aDbConfig); $data = array('type' => $_REQUEST['type'], 'target' => $_REQUEST['target'], 'money' => $order_price, 'mch_vno' => $mch_vno, 'req_url' => $reqUrl, 'debug_info' => $debugInfo, 'createtime' => time()); $ret = $oDb->insert('tb_pay', $data); if (!$ret) { file_put_contents('error.txt', var_export($data, true) . "\n", FILE_APPEND); } //---跳转 header("Location:" . $reqUrl); exit; //获取debug信息,建议把请求和debug信息写入日志,方便定位问题 /**/ echo "<br/>" . $reqUrl . "<br/>"; echo "<br/>" . $debugInfo . "<br/>"; ?> <html> <head>
function getDb() { global $aNewDbConfig; $oDb = DbMysql::getInstance($aNewDbConfig); return $oDb; }