<?php
/**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2021, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
*
* @param string|array $table Table name
* @param array $conditions Field condition(s)
- * @param array $options
- * - cascade: If true we delete records in other tables that depend on the one we're deleting through
- * relations (default: true)
*
* @return boolean was the delete successful?
* @throws \Exception
* @return boolean|object
*
* Example:
- * $table = "item";
+ * $table = "post";
* $fields = array("id", "uri", "uid", "network");
*
* $condition = array("uid" => 1, "network" => 'dspr');
* @return int
*
* Example:
- * $table = "item";
+ * $table = "post";
*
* $condition = ["uid" => 1, "network" => 'dspr'];
* or:
/**
* Fills an array with data from a query
*
- * @param object $stmt statement object
- * @param bool $do_close
+ * @param object $stmt statement object
+ * @param bool $do_close Close database connection after last row
+ * @param int $count maximum number of rows to be fetched
+ *
* @return array Data array
*/
- public static function toArray($stmt, $do_close = true)
+ public static function toArray($stmt, $do_close = true, int $count = 0)
{
- return DI::dba()->toArray($stmt, $do_close);
+ return DI::dba()->toArray($stmt, $do_close, $count);
}
/**