Skip to content

Commit

Permalink
Remove unused support for fetchSingleRow getting MySQL result
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Čihař <michal@cihar.com>
  • Loading branch information
nijel committed May 8, 2014
1 parent 862541d commit 98c7ac9
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions libraries/DatabaseInterface.class.php
Expand Up @@ -1664,25 +1664,22 @@ public function fetchValue($query, $row_number = 0, $field = 0, $link = null)
* // $user = array('id' => 123, 'name' => 'John Doe')
* </code>
*
* @param string|mysql_result $result query or mysql result
* @param string $type NUM|ASSOC|BOTH
* returned array should either numeric
* associativ or booth
* @param resource $link mysql link
* @param string $query The query to execute
* @param string $type NUM|ASSOC|BOTH returned array should either
* numeric associativ or both
* @param resource $link mysql link
*
* @return array|boolean first row from result
* or false if result is empty
*/
public function fetchSingleRow($result, $type = 'ASSOC', $link = null)
public function fetchSingleRow($query, $type = 'ASSOC', $link = null)
{
if (is_string($result)) {
$result = $this->tryQuery(
$result,
$link,
self::QUERY_STORE,
false
);
}
$result = $this->tryQuery(
$query,
$link,
self::QUERY_STORE,
false
);

// return null if result is empty or false
if (! $this->numRows($result)) {
Expand Down

0 comments on commit 98c7ac9

Please sign in to comment.