Location: PHPKode > scripts > TQuery > tquery/TQueryClass.php
/* 
	Author : Marcio Sfalsin
	Date   : 27/06/2003

	Description : A TQuery Class like delphi TQuery... for ex-delphi programmers...

*/

class Query
{
	var $DataBase;
	var $SQL;
	var $Cursor;
	function Query(&$value_database)
	{
		$this->DataBase = $value_database;
	}
	function Open()
	{
		$this->Cursor = ociparse($this->DataBase,$this->SQL) or die("SQL sintaxe error!");  
		return ociexecute($this->Cursor) or die("Uknow object error!");
	}
	function FetchIntoArray(&$value_array)
	{
		return ocifetchinto($this->Cursor,$value_array);
	}
	function Fetch()
	{
		return ocifetch($this->Cursor);
	}
	function FieldByName($value_column)
	{
		return ociresult($this->Cursor,strtoupper($value_column));
	}
}

Return current item: TQuery