X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fdba.php;h=5f633afaaa65328f7087ede40faf130a4e06e637;hb=a7fac5a76fef1be6722e41c91ae3a6601a36110c;hp=bccd9792bea798f020c99a7486c4e7dd769fa2aa;hpb=4db98eb43d90a56b1e983628910641c9cc567b8a;p=friendica.git diff --git a/include/dba.php b/include/dba.php index bccd9792be..5f633afaaa 100644 --- a/include/dba.php +++ b/include/dba.php @@ -1,30 +1,43 @@ . + * + */ use Friendica\Database\DBA; -function dbesc($str) { - if (DBA::$connected) { - return(DBA::escape($str)); - } else { - return(str_replace("'","\\'",$str)); - } -} - /** - * @brief execute SQL query with printf style args - deprecated + * execute SQL query with printf style args - deprecated * - * Please use the dba:: functions instead: - * dba::select, dba::exists, dba::insert - * dba::delete, dba::update, dba::p, dba::e + * Please use the DBA:: functions instead: + * DBA::select, DBA::exists, DBA::insert + * DBA::delete, DBA::update, DBA::p, DBA::e * - * @param $args Query parameters (1 to N parameters of different types) + * @param $sql * @return array|bool Query array + * @throws Exception + * @deprecated */ function q($sql) { $args = func_get_args(); unset($args[0]); - if (!DBA::$connected) { + if (!DBA::connected()) { return false; } @@ -49,7 +62,3 @@ function q($sql) { return $data; } - -function dba_timer() { - return microtime(true); -}