Пример #1
0
 /**
  * This function closes an open connection.
  *
  * @access public
  * @override
  * @return boolean                              whether an open connection was closed
  */
 public function close()
 {
     if ($this->is_connected()) {
         if (!@drizzle_con_close($this->resource)) {
             return FALSE;
         }
         $this->resource = NULL;
     }
     return TRUE;
 }
Пример #2
0
 function close()
 {
     if (strcmp($this->database_type, "mysql") == 0) {
         if (!mysql_close($this->connection)) {
             die("Could not close connection: " . mysql_error());
         }
     }
     if (strcmp($this->database_type, "drizzle") == 0) {
         drizzle_con_close($this->connection);
         /*
         if (!drizzle_con_close($this->connection)) {
         	die("Could not close connection: " . drizzle_con_error($this->connection));
         }
         */
     }
     return 1;
 }