/**
  * Disconnect
  *
  * @return  bool success
  */
 public function close()
 {
     if ($this->handle && ($r = sybase_close($this->handle))) {
         $this->handle = NULL;
         return $r;
     }
     return FALSE;
 }
 function CanConnectDatabase()
 {
     global $dcl_domain_info, $dcl_domain;
     $conn = sybase_connect($dcl_domain_info[$dcl_domain]['dbHost'], $dcl_domain_info[$dcl_domain]['dbUser'], $dcl_domain_info[$dcl_domain]['dbPassword']);
     if ($conn > 0) {
         $bRetVal = sybase_select_db($dcl_domain_info[$dcl_domain]['dbName'], $conn);
         sybase_close($conn);
         return $bRetVal;
     }
     return false;
 }
Example #3
0
 public function findBookByPage($qtxt, $offset, $itemCountPerPage)
 {
     $link = $this->getDB();
     $qtxt = iconv("utf-8", "gbk//ignore", $qtxt);
     $rs = sybase_query("exec llt_searchByPage " . "'" . $qtxt . "'," . $offset . "," . $itemCountPerPage, $link);
     $data = array();
     while ($row = sybase_fetch_array($rs)) {
         $book = new Book();
         $book->no = $row["ctrlno"];
         $book->title = iconv("gbk", "utf-8//ignore", $row["title"]);
         $book->authors = iconv("gbk", "utf-8//ignore", $row["authors"]);
         $book->publisher = iconv("gbk", "utf-8//ignore", $row["publisher"]);
         $book->pubdate = iconv("gbk", "utf-8//ignore", $row["pubdate"]);
         $book->barcode = $row["barcode"];
         $book->status = iconv("gbk", "utf-8//ignore", $row["status"]);
         $book->classno = iconv("gbk", "utf-8//ignore", $row["classno"]);
         array_push($data, $book);
     }
     sybase_free_result($rs);
     sybase_close($link);
     return $data;
 }
 function _close()
 {
     return @sybase_close($this->_connectionID);
 }
 /**
  * Disconnects from database.
  *
  * @return boolean True if the database could be disconnected, else false
  */
 function disconnect()
 {
     $this->connected = !@sybase_close($this->connection);
     return !$this->connected;
 }
function sql_logout($id)
{
    global $dbtype;
    switch ($dbtype) {
        case "MySQL":
            $dbi = @mysql_close($id);
            return $dbi;
            break;
        case "mSQL":
            $dbi = @msql_close($id);
            return $dbi;
            break;
        case "postgres":
        case "postgres_local":
            $dbi = @pg_close($id);
            return $dbi;
            break;
        case "ODBC":
        case "ODBC_Adabas":
            $dbi = @odbc_close($id);
            return $dbi;
            break;
        case "Interbase":
            $dbi = @ibase_close($id);
            return $dbi;
            break;
        case "Sybase":
            $dbi = @sybase_close($id);
            return $dbi;
            break;
        default:
            break;
    }
}
Example #7
0
 protected function disconnect()
 {
     sybase_close($this->link);
 }
Example #8
0
<?php

//phpinfo();
$link = @sybase_connect('lltang2000', 'sa', '******') or die("Could not connect !");
//连接数据库,第一空必须写服务名称,不能是ip;
echo "Connected successfully<br>";
$db = @sybase_select_db("sulcmis", $link) or die("数据库没有选择");
echo "数据库选择成功<br>";
$sql = "select ctrlNo,F200,F210c from b_brief where ctrlNo<100";
$rs = sybase_query($sql, $link);
//查询表
if (!$rs) {
    echo "SQL:" . $sql . "执行失败!";
    exit;
}
//$sybase = sybase_fetch_array($rs);
//print_r($sybase);//结束
echo '<table border="1"><tr><td>CtrlNO</td><td>F200</td><td>F210c</td>';
while ($row = sybase_fetch_array($rs)) {
    $id = $row["ctrlNo"];
    $F200 = $row["F200"];
    $F210c = $row["F210c"];
    echo '<tr><td>' . $id . '</td><td>' . $F200 . '</td><td>' . $F210c . '</td></tr>';
}
echo '</table>';
sybase_free_result($rs);
sybase_close($link);
?>

Example #9
0
 function close()
 {
     sybase_close($this->db_link_ptr);
 }
Example #10
0
 /**
  * Disconnect from the database
  */
 protected function disconnect()
 {
     @sybase_close();
 }
Example #11
0
 /**
  * Closes the connection to the database.
  * 
  * @return boolean
  */
 function dbclose()
 {
     return sybase_close($this->conn);
 }
 /**
  * Disconnect
  *
  * @return  bool success
  */
 public function close()
 {
     $r = $this->handle && sybase_close($this->handle);
     $this->handle = null;
     return (bool) $r;
 }
Example #13
0
 function disconnect_sybase($sybase_link)
 {
     if ($sybase_link) {
         sybase_close($sybase_link);
         $sybase_link = false;
     } else {
         return false;
     }
 }
Example #14
0
 public function close()
 {
     sybase_free_result($this->result);
     sybase_close($this->link);
 }
 /**
  * Close DB Connection
  *
  * @access	public
  * @param	resource
  * @return	void
  */
 function _close()
 {
     @sybase_close($this->conn_id);
 }
 /**
  * Disconnects from the database server
  *
  * @return bool  TRUE on success, FALSE on failure
  */
 function disconnect()
 {
     $ret = @sybase_close($this->connection);
     $this->connection = null;
     return $ret;
 }
 public function close()
 {
     if (!empty($this->connect)) {
         @sybase_close($this->connect);
     } else {
         return false;
     }
 }