10 defined(
'JPATH_PLATFORM') or die;
31 public function query()
33 JLog::add(
'JDatabase::query() is deprecated, use JDatabaseDriver::execute() instead.',
JLog::WARNING,
'deprecated');
35 return $this->execute();
48 public static function getConnectors()
50 JLog::add(
'JDatabase::getConnectors() is deprecated, use JDatabaseDriver::getConnectors() instead.',
JLog::WARNING,
'deprecated');
65 public function getErrorMsg($escaped =
false)
67 JLog::add(
'JDatabase::getErrorMsg() is deprecated, use exception handling instead.',
JLog::WARNING,
'deprecated');
71 return addslashes($this->errorMsg);
75 return $this->errorMsg;
87 public function getErrorNum()
89 JLog::add(
'JDatabase::getErrorNum() is deprecated, use exception handling instead.',
JLog::WARNING,
'deprecated');
91 return $this->errorNum;
111 public static function getInstance($options = array())
113 JLog::add(
'JDatabase::getInstance() is deprecated, use JDatabaseDriver::getInstance() instead.',
JLog::WARNING,
'deprecated');
128 public static function splitSql($query)
130 JLog::add(
'JDatabase::splitSql() is deprecated, use JDatabaseDriver::splitSql() instead.',
JLog::WARNING,
'deprecated');
145 public function stderr($showSQL =
false)
149 if ($this->errorNum != 0)
151 return JText::sprintf(
'JLIB_DATABASE_ERROR_FUNCTION_FAILED', $this->errorNum, $this->errorMsg)
152 . ($showSQL ?
"<br />SQL = <pre>$this->sql</pre>" :
'');
156 return JText::_(
'JLIB_DATABASE_FUNCTION_NOERROR');
168 public static function test()
170 JLog::add(
'JDatabase::test() is deprecated. Use JDatabaseDriver::isSupported() instead.',
JLog::WARNING,
'deprecated');
172 return static::isSupported();