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
*
*
* @param $args Query parameters (1 to N parameters of different types)
* @return array|bool Query array
+ * @deprecated
*/
function q($sql) {
$args = func_get_args();
return false;
}
- $sql = DBA::clean_query($sql);
+ $sql = DBA::cleanQuery($sql);
$sql = DBA::anyValueFallback($sql);
$stmt = @vsprintf($sql, $args);
$columns = DBA::columnCount($ret);
- $data = DBA::inArray($ret);
+ $data = DBA::toArray($ret);
if ((count($data) == 0) && ($columns == 0)) {
return true;
return $data;
}
-
-function dba_timer() {
- return microtime(true);
-}