Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F41922055
MySQLDatabaseResult.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
MySQLDatabaseResult.php
View Options
<?php
/**
* _, __, _, _ __, _ _, _, _
* / \ |_) (_ | | \ | /_\ |\ |
* \ / |_) , ) | |_/ | | | | \|
* ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
*
* Database base class
*
* @package ObsidianWorkspaces
* @subpackage Keruald
* @author Sébastien Santoro aka Dereckson <dereckson@espace-win.org>
* @license http://www.opensource.org/licenses/bsd-license.php BSD
* @filesource
*
*/
class
MySQLDatabaseResult
extends
DatabaseResult
{
///
/// Private members
///
/**
* @var resource The resource to the MySQL result
*/
private
$result
;
///
/// Constructor
///
/**
* Initializes a new instance of the MySQLDatabaseResult class
*
* @param resource $result the resource to the MySQL result
*/
public
function
MySQLDatabaseResult
(
$result
)
{
$this
->
result
=
$result
;
}
///
/// DatabaseResult implementation
///
/**
* Gets number of rows in result
*
* @return int The number of rows in the specified result
*/
public
function
numRows
()
{
return
mysql_num_rows
(
$this
->
result
);
}
/**
* Fetches a row of the result
*
* @param DatabaseResult $result The query result
* @return array An associative array with the databae result
*/
public
function
fetchRow
()
{
return
mysql_fetch_array
(
$this
->
result
);
}
///
/// IteratorAggregate implementation
///
/**
* Gets an iterator
*
* @return Generator an iterator on the query result
*/
public
function
getIterator
()
{
while
(
$row
=
$this
->
fetchRow
())
{
yield
$row
;
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Aug 8, 02:55 (13 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3943475
Default Alt Text
MySQLDatabaseResult.php (1 KB)
Attached To
Mode
rOBSIDIAN Obsidian Workspaces
Attached
Detach File
Event Timeline
Log In to Comment