DbQuery Class Reference

Inheritance diagram for DbQuery:

Iterator List of all members.

Detailed Description

This object represent result of a SQL query.

You can use this object in foreach() construct. For details see Iterator interface documentation.

Definition at line 74 of file db.php.

Public Member Functions

 __construct ($sql)
 current ()
 key ()
 Unimplemented.
 next ()
 rewind ()
 valid ()

Private Attributes

 $result = NULL
 $row
 $sql


Member Function Documentation

DbQuery::__construct sql  ) 
 

Definition at line 80 of file db.php.

References $sql.

00080                                {
00081       $this->sql = $sql;
00082     }

DbQuery::current  ) 
 

Definition at line 97 of file db.php.

00097                        {
00098       return $this->row;
00099     }

DbQuery::key  ) 
 

Unimplemented.

Definition at line 102 of file db.php.

00102 { return 0; }

DbQuery::next  ) 
 

Definition at line 104 of file db.php.

00104                     {
00105       $this->row = $this->result->fetch_object();
00106     }

DbQuery::rewind  ) 
 

Exceptions:
Exception. On SQL error.

Definition at line 87 of file db.php.

00087                       {
00088       if (!is_null($this->result)):
00089         $this->result->close();
00090         $this->result = NULL;
00091       endif;
00092       $db = new Db();
00093       $this->result = $db->query($this->sql);
00094       $this->row = $this->result->fetch_object();
00095     }

DbQuery::valid  ) 
 

Definition at line 108 of file db.php.

00108                      {
00109       return $this->result and $this->row;
00110     }


Member Data Documentation

DbQuery::$result = NULL [private]
 

Definition at line 77 of file db.php.

DbQuery::$row [private]
 

Definition at line 78 of file db.php.

DbQuery::$sql [private]
 

Definition at line 76 of file db.php.

Referenced by __construct().


The documentation for this class was generated from the following file:
Generated on Sat Sep 24 01:26:42 2005 for Easy PHP Framework by  doxygen 1.4.2