aboutsummaryrefslogtreecommitdiffstats
path: root/library/ajaxchat/chat/lib/class/AJAXChatMySQLiQuery.php
diff options
context:
space:
mode:
authorMichael Meer <michael@meer.name>2014-01-28 09:49:09 +0100
committerMichael Meer <michael@meer.name>2014-01-28 09:49:09 +0100
commit8ddee71c2b0f384470965dd46a2e594a4f98f8e0 (patch)
tree84bcf6e0f94365b186b4613b43d7a72f5f22f525 /library/ajaxchat/chat/lib/class/AJAXChatMySQLiQuery.php
parent904db593df914d2932d9c2f018b00987052461d7 (diff)
parentf104b4dc275891785ec03abd779d8aafe5163815 (diff)
downloadvolse-hubzilla-8ddee71c2b0f384470965dd46a2e594a4f98f8e0.tar.gz
volse-hubzilla-8ddee71c2b0f384470965dd46a2e594a4f98f8e0.tar.bz2
volse-hubzilla-8ddee71c2b0f384470965dd46a2e594a4f98f8e0.zip
Merge branch 'master' of https://github.com/friendica/red
to be in sync with main repro
Diffstat (limited to 'library/ajaxchat/chat/lib/class/AJAXChatMySQLiQuery.php')
-rw-r--r--library/ajaxchat/chat/lib/class/AJAXChatMySQLiQuery.php81
1 files changed, 0 insertions, 81 deletions
diff --git a/library/ajaxchat/chat/lib/class/AJAXChatMySQLiQuery.php b/library/ajaxchat/chat/lib/class/AJAXChatMySQLiQuery.php
deleted file mode 100644
index f81afd886..000000000
--- a/library/ajaxchat/chat/lib/class/AJAXChatMySQLiQuery.php
+++ /dev/null
@@ -1,81 +0,0 @@
-<?php
-/*
- * @package AJAX_Chat
- * @author Sebastian Tschan
- * @copyright (c) Sebastian Tschan
- * @license Modified MIT License
- * @link https://blueimp.net/ajax/
- */
-
-// Class to perform SQL (MySQLi) queries:
-class AJAXChatMySQLiQuery {
-
- var $_connectionID;
- var $_sql = '';
- var $_result = 0;
- var $_errno = 0;
- var $_error = '';
-
- // Constructor:
- function __construct($sql, $connectionID) {
- $this->_sql = trim($sql);
- $this->_connectionID = $connectionID;
- $this->_result = $this->_connectionID->query($this->_sql);
- if(!$this->_result) {
- $this->_errno = $this->_connectionID->errno;
- $this->_error = $this->_connectionID->error;
- }
- }
-
- // Returns true if an error occured:
- function error() {
- // Returns true if the Result-ID is valid:
- return !(bool)($this->_result);
- }
-
- // Returns an Error-String:
- function getError() {
- if($this->error()) {
- $str = 'Query: ' .$this->_sql ."\n";
- $str .= 'Error-Report: ' .$this->_error."\n";
- $str .= 'Error-Code: '.$this->_errno;
- } else {
- $str = "No errors.";
- }
- return $str;
- }
-
- // Returns the content:
- function fetch() {
- if($this->error()) {
- return null;
- } else {
- return $this->_result->fetch_assoc();
- }
- }
-
- // Returns the number of rows (SELECT or SHOW):
- function numRows() {
- if($this->error()) {
- return null;
- } else {
- return $this->_result->num_rows;
- }
- }
-
- // Returns the number of affected rows (INSERT, UPDATE, REPLACE or DELETE):
- function affectedRows() {
- if($this->error()) {
- return null;
- } else {
- return $this->_connectionID->affected_rows;
- }
- }
-
- // Frees the memory:
- function free() {
- $this->_result->free();
- }
-
-}
-?> \ No newline at end of file