PHP 8.5.0 Beta 1 available for testing

Voting

: three minus three?
(Example: nine)

The Note You're Voting On

blar at blar dot de
16 years ago
Extending the MySQLi_Result

<?php

class Database_MySQLi extends MySQLi
{
public function
query($query)
{
$this->real_query($query);
return new
Database_MySQLi_Result($this);
}
}

class
Database_MySQLi_Result extends MySQLi_Result
{
public function
fetch()
{
return
$this->fetch_assoc();
}

public function
fetchAll()
{
$rows = array();
while(
$row = $this->fetch())
{
$rows[] = $row;
}
return
$rows;
}
}

?>

<< Back to user notes page

To Top