aboutsummaryrefslogtreecommitdiffstats
path: root/include/dba/dba_mysql.php
diff options
context:
space:
mode:
authorKlaus Weidenbach <Klaus.Weidenbach@gmx.net>2017-12-08 00:26:00 +0100
committerKlaus Weidenbach <Klaus.Weidenbach@gmx.net>2018-01-28 23:02:15 +0100
commit509844fd7e08ebccec4d924845d0f2a60f5768e5 (patch)
treeb74df0038713c1ab4570ab03ebe1c238085c8905 /include/dba/dba_mysql.php
parentfb111e6d958fdf56352db66e144134241abbacf8 (diff)
downloadvolse-hubzilla-509844fd7e08ebccec4d924845d0f2a60f5768e5.tar.gz
volse-hubzilla-509844fd7e08ebccec4d924845d0f2a60f5768e5.tar.bz2
volse-hubzilla-509844fd7e08ebccec4d924845d0f2a60f5768e5.zip
:fire: Cleanup old database related files.
Remove non used database drivers, remove unused methods. Improve documentation.
Diffstat (limited to 'include/dba/dba_mysql.php')
-rwxr-xr-xinclude/dba/dba_mysql.php67
1 files changed, 0 insertions, 67 deletions
diff --git a/include/dba/dba_mysql.php b/include/dba/dba_mysql.php
deleted file mode 100755
index 8b51cf578..000000000
--- a/include/dba/dba_mysql.php
+++ /dev/null
@@ -1,67 +0,0 @@
-<?php
-
-require_once('include/dba/dba_driver.php');
-
-
-class dba_mysql extends dba_driver {
-
- function connect($server, $scheme, $port, $user,$pass,$db) {
- $this->db = mysql_connect($server.":".$port,$user,$pass);
- if($this->db && mysql_select_db($db,$this->db)) {
- $this->connected = true;
- }
- if($this->connected) {
- return true;
- }
- return false;
- }
-
-
- function q($sql) {
- if((! $this->db) || (! $this->connected))
- return false;
-
- $this->error = '';
- $result = @mysql_query($sql,$this->db);
-
-
- if(mysql_errno($this->db))
- $this->error = mysql_error($this->db);
-
- if($result === false || $this->error) {
- logger('dba_mysql: ' . printable($sql) . ' returned false.' . "\n" . $this->error);
- if(file_exists('dbfail.out'))
- file_put_contents('dbfail.out', datetime_convert() . "\n" . printable($sql) . ' returned false' . "\n" . $this->error . "\n", FILE_APPEND);
- }
-
- if(($result === true) || ($result === false))
- return $result;
-
- $r = array();
- if(mysql_num_rows($result)) {
- while($x = mysql_fetch_array($result,MYSQL_ASSOC))
- $r[] = $x;
- mysql_free_result($result);
- if($this->debug)
- logger('dba_mysql: ' . printable(print_r($r,true)));
- }
- return $r;
- }
-
- function escape($str) {
- if($this->db && $this->connected) {
- return @mysql_real_escape_string($str,$this->db);
- }
- }
-
- function close() {
- if($this->db)
- mysql_close($this->db);
- $this->connected = false;
- }
-
- function getdriver() {
- return 'mysql';
- }
-
-}