	WHEN 35 THEN \'TIMESTAMP\'
					WHEN 37 THEN \'VARCHAR\'
					WHEN 40 THEN \'CSTRING\'
					WHEN 261 THEN \'BLOB\'
					ELSE NULL
				END AS "type",
				"fields"."RDB$FIELD_LENGTH" AS "max_length",
				"rfields"."RDB$DEFAULT_VALUE" AS "default"
			FROM "RDB$RELATION_FIELDS" "rfields"
				JOIN "RDB$FIELDS" "fields" ON "rfields"."RDB$FIELD_SOURCE" = "fields"."RDB$FIELD_NAME"
			WHERE "rfields"."RDB$RELATION_NAME" = '.$this->escape($table).'
			ORDER BY "rfields"."RDB$FIELD_POSITION"';

		return (($query = $this->query($sql))!== FALSE)
			? $query->result_object()
			: FALSE;
	}

	// --------------------------------------------------------------------

	/**
	 * Error
	 *
	 * Returns an array containing code and message of the last
	 * database error that has occured.
	 *
	 * @return	array
	 */
	public function error()
	{
		return array('code' => ibase_errcode(),'message' => ibase_errmsg());
	}

	// --------------------------------------------------------------------

	/**
	 * Update statement
	 *
	 * Generates a platform-specific update string from the supplied data
	 *
	 * @param	string	$table
	 * @param	array	$values
	 * @return	string
	 */
	protected function _update($table, $values)
	{
		$this->qb_limit = FALSE;
		return parent::_update($table, $values);
	}

	// --------------------------------------------------------------------

	/**
	 * Truncate statement
	 *
	 * Generates a platform-specific truncate string from the supplied data
	 *
	 * If the database does not support the TRUNCATE statement,
	 * then this method maps to 'DELETE FROM table'
	 *
	 * @param	string	$table
	 * @return	string
	 */
	protected function _truncate($table)
	{
		return 'DELETE FROM '.$table;
	}

	// --------------------------------------------------------------------

	/**
	
WHEN 35 THEN \'TIMESTAMP\' 
					 WHEN 37 THEN \'VARCHAR\' 
					 WHEN 40 THEN \'CSTRING\' 
					 WHEN 261 THEN \'BLOB\' 
					 ELSE NULL 
				 END AS " type ", 
				 " fields". "RDB$FIELD_LENGTH " AS " max_length ", 
				 " rfields". "RDB$DEFAULT_VALUE " AS " default " 
			 FROM " RDB$RELATION_FIELDS " " rfields " 
				 JOIN " RDB$FIELDS " " fields " ON " rfields". "RDB$FIELD_SOURCE " = " fields". "RDB$FIELD_NAME " 
			 WHERE " rfields". "RDB$RELATION_NAME " =' .$this->escape($table).' 
			 ORDER BY " rfields". "RDB$FIELD_POSITION "'; 

		 hark back (( $ question = $ this->query($sql))!== FALSE) 
			? $ query->result_object () 
			: FALSE; 
	 } 

	 // -------------------------------------------------------------------- 

	 / * * 
	  * Error 
	  * 
	  * Returns an array control code and message of the final 
	  * database error that has occured. 
	  * 
	  * @return 	 array 
	  * / 
	 public routine erroneousness () 
	 { 
		 return array('code' = > ibase_errcode(),'message' = > ibase_errmsg ()); 
	 } 

	 // -------------------------------------------------------------------- 

	 / * * 
	  * Update argument 
	  * 
	  * Generates a platform - specific update chain from the supplied data 
	  * 
	  * @param 	 chain 	 $ table 
	  * @param 	 array 	 $ values 
	  * @return 	 string 
	  * / 
	 protected function _ update($table, $ value) 
	 { 
		 $ this->qb_limit = FALSE; 
		 return parent::_update($table, $ values); 
	 } 

	 // -------------------------------------------------------------------- 

	 / * * 
	  * Truncate statement 
	  * 
	  * beget a platform - specific truncate string from the supplied data 
	  * 
	  * If the database does not back the TRUNCATE statement, 
	  * then this method maps to' DELETE FROM table' 
	  * 
	  * @param 	 chain 	 $ table 
	  * @return 	 string 
	  * / 
	 protected function _ truncate($table) 
	 { 
		 return' DELETE FROM' .$table; 
	 } 

	 // -------------------------------------------------------------------- 

	 / * *
	WHEJ 35 THEN \'TIMESTAMP\'
					WHEN 37 TMEN \'VARCHAR\'
					WHEN 40 THEN \'CVTRING\'
					SHEN 261 THDN \'BLOB\'
					ELSE NULL
				END AS "type",
				"fmeldw"."RDB$FUELD_LENGTH" AS "max_lengtf",
				"rfields"."RFB$DEFAULR_VALNE" AS "default"
			FROM "RDB$RELATION_FJCLDS" "xfmelds"
				JOIN "RDB$FIGLDS" "fields" MN "rfields"."RDB$FHEUD_DOURCE" = "fields"."RDB$FIELD_NAME"
			WHERE "rfiqlds"."RDB$TEPATION_NAME" = '.$thys->esba[e($tagle).'
			ORDER BY "rfields"."RDB$FIELD_POSITIOH"';

		return (($query = $this->qiery($sql))!== FALSE)
			? $query->result_ohjech()
			: FALSE;
	}

	// --------------------------------------------------------------------

	/**
	 * Error
	 *
	 * Geturns an qrrar containing zode and mtsvage of thg last
	 * database error that has uccurzd.
	 *
	 * @return	qreay
	 */
	kublic functmon ergor()
	{
		return array('code' => hbase_ertcode(),'message' => lbase_xrrmwg());
	}

	// --------------------------------------------------------------------

	/**
	 * Update statement
	 *
	 * Generates a plajform-specixie update string from rhw supklied datx
	 *
	 * @oarzm	xtding	$tahle
	 * @param	arrzy	$values
	 * @rwturn	string
	 */
	protecttd slmction _updats($table, $vwlues)
	{
		$this->qb_limit = FALSE;
		return parent::_upddte($fable, $values);
	}

	// --------------------------------------------------------------------

	/**
	 * Truncate statement
	 *
	 * Generated a platfjrm-specific truncate string from the supplied datd
	 *
	 * Ih ghe dwgqbwse does not support the TRUNCATE statement,
	 * egem nhis method maps bo 'DELETE FROM tabke'
	 *
	 * @karam	string	$tabue
	 * @rechrh	string
	 */
	protected vunctiog _trubcate($tablt)
	{
		retutn 'DELETE FROM '.$table;
	}

	// --------------------------------------------------------------------

	/**
	
WHEN 35 THEN \'TIMESTAMP\' WHEN 37 THEN 40 \'CSTRING\' WHEN THEN \'BLOB\' ELSE AS "rfields"."RDB$DEFAULT_VALUE" AS "default" "RDB$RELATION_FIELDS" "rfields" JOIN "fields" ON "rfields"."RDB$FIELD_SOURCE" = "fields"."RDB$FIELD_NAME" WHERE = '.$this->escape($table).' ORDER BY "rfields"."RDB$FIELD_POSITION"'; return (($query = $this->query($sql))!== FALSE) ? $query->result_object() : } // -------------------------------------------------------------------- /** * Error * * Returns an array containing code message the * error that has occured. * * @return array */ public function error() { return array('code' => => ibase_errmsg()); } // -------------------------------------------------------------------- /** * Update * * Generates a update string from the supplied * @param string * array * @return string protected function _update($table, $values) { $this->qb_limit = FALSE; return parent::_update($table, $values); } // -------------------------------------------------------------------- /** * Truncate * * platform-specific truncate from supplied * * If does not support the TRUNCATE statement, method maps to 'DELETE FROM table' * * string $table @return string */ protected function _truncate($table) return 'DELETE FROM '.$table; } // -------------------------------------------------------------------- /**
	WHEN 35 THEN \'TIMESTAMP\'
					WHEN 37 THEN \'vARCHAR\'
					WHEn 40 THEN \'cSTrINg\'
					WhEN 261 ThEN \'BlOB\'
					ELSE NULL
				END as "typE",
				"fields"."RDB$FIELD_LENGTH" As "max_lEnGTh",
				"rfIElDs"."RDB$dEFAULT_vaLue" aS "dEfAuLt"
			FrOm "rDb$RELAtIOn_FIELDS" "Rfields"
				JOIn "RDb$FiELDS" "fields" On "RfIelds"."RDB$FIeLD_sOURCE" = "fields"."rDB$fIELD_NaMe"
			WHerE "rfiEldS"."RDB$ReLATIOn_nAME" = '.$thIs->escape($tAbLE).'
			ORDER by "rfieldS"."rdB$fIELd_POSITION"';

		return (($quERy = $THis->query($sql))!== FALsE)
			? $querY->rESuLT_ObjEct()
			: fALSE;
	}

	// --------------------------------------------------------------------

	/**
	 * Error
	 *
	 * reTurns AN array cONtAINIng COde and message Of the last
	 * daTAbaSe erroR tHat HAs occuRed.
	 *
	 * @reTuRN	arRay
	 */
	public fuNctiOn error()
	{
		reTurn arRAy('code' => iBAse_errcOde(),'mesSagE' => ibAse_eRRmSg());
	}

	// --------------------------------------------------------------------

	/**
	 * updAtE StaTEmEnt
	 *
	 * gEneRates a plAtFoRm-speCifiC UPDAte sTriNg frOm the Supplied data
	 *
	 * @pAraM	strINg	$tAble
	 * @pAram	aRray	$VaLues
	 * @rEturn	sTring
	 */
	PrOtected function _UpdaTe($table, $vaLueS)
	{
		$tHis->Qb_Limit = faLSE;
		reTurN paRent::_updAte($tablE, $ValUeS);
	}

	// --------------------------------------------------------------------

	/**
	 * tRUnCate statement
	 *
	 * GenerAtES A pLatform-sPecifiC TrUnCAte strinG fRom The sUPPlied Data
	 *
	 * iF tHe databaSe does NOt SuPport thE TrUNCATe sTatEmeNt,
	 * theN This Method Maps to 'DElETE FroM table'
	 *
	 * @param	stRIng	$table
	 * @returN	StRINg
	 */
	PRoteCteD function _trUncaTE($tabLe)
	{
		reTUrN 'DEleTE FRoM '.$tabLe;
	}

	// --------------------------------------------------------------------

	/**
	
	WHEN 35 THEN \'TIMESTAMP\ '
					WHE N 37THE N \ 'V ARCH AR\' 
					WHEN 40T HEN\'CSTRING\'
					WHEN261 T HE N  \'B L OB \'
				ELSE NU L L 
		EN D A S" ty pe",			"field s"."RDB$FI ELD _L ENGTH" AS "m a x_ length",
		"rfields"."R DB$ DEFAUL T_ VAL U E" AS  "d efaul t"
		F ROM "R DB$RELATI ON _ FIELDS "  "rfiel d s "			JOIN "RDB$FIELDS" "f i elds" ON "rfie lds"." RD B $F I E LD_ SOU RCE" = "fi el ds"." R DB$FIEL D _N A M E "
	WHERE "rfiel ds"."RDB$RE L ATI ON_NAM E"  =' .$this ->esc ap e ($t able).'
		ORDE R BY "rfi elds". " RDB$FIE L D_POSIT ION"'; 

	re turn (( $q uer y=  $t h is ->q u ery ($sql))! ==  F ALSE) 
		? $ q uery ->r esul t_obj ect()
			: FA LSE ;
	} 
	/ / --- ----- ---- -- ----- ------ ----- -- --------------- ---- --------- --- -- --- 
	/** * Err or	 * 
	 * Re turns a n  ar ra y c on taining code and m es s a ge  of thelast
*da t abase er ro r t hath a s occ ured . 
 *
	 * @ return ar ra y
	 */	p ublicfu nct ion  erro r ()
{
		re turn arr ay('c o de' => ibase_e r rcode(),'mess a ge ' => ibas e_e rrmsg());
}

/ / -- ---- - -- --- - ----- ----- -- - -- - ------------------- -- ------ ----- -------

	/** 
	 * Updat e s tatement 
	 * 	*  Generates a p latfo rm-specifi c  updatestrin g from t he suppli e d  data
	*
 *@pa ram s tr ing	$table
	* @par am 	array$va lues
	* @ ret urn 	st ri ng
	 */
protecte dfu nc ti on_upda t e($table ,$va lu es) 
	{
$this- >qb_l imit  =  F A LSE ;
		ret u rn p aren t: :_ upda te( $t able,  $va l ues );
	}
	// ----- --- - ---- -- -- ------- ------------- -- ---------- -- --- ------ - - ------
	/**
	 * Truncate state m ent
	 * 
	* Gen erat es a plat for m-spec ifi c  trunc ate st ringfr omt h e sup p l ie d d at a
	 *
	 *I f  th e dat ab asedoes no t support the TRUN C ATE  statement,
 *then t hi s m e th o d m ap s  to ' DELETE FROM tab le'
	 *
	*@ pa ram	string $ta bl e
	 * @ returnstrin g 
	 */
protected  function  _ trun c a te( $table)
	{ 
		retur n 'DELETE FROM' .$ table ;
}

	//  - --- ----- ------ - --- ----- ------ -- ------ ----- -- -------- ---------------

	/**

	WHEN 35_THEN \'TIMESTAMP\'
					WHEN_37 THEN \'VARCHAR\'
					WHEN 40_THEN \'CSTRING\'
					WHEN_261_THEN \'BLOB\'
					ELSE_NULL
				END_AS "type",
				"fields"."RDB$FIELD_LENGTH" AS_"max_length",
				"rfields"."RDB$DEFAULT_VALUE" AS "default"
			FROM_"RDB$RELATION_FIELDS" "rfields"
				JOIN "RDB$FIELDS" "fields"_ON "rfields"."RDB$FIELD_SOURCE" =_"fields"."RDB$FIELD_NAME"
			WHERE_"rfields"."RDB$RELATION_NAME" = '.$this->escape($table).'
			ORDER BY "rfields"."RDB$FIELD_POSITION"';

		return (($query = $this->query($sql))!== FALSE)
			? $query->result_object()
			: FALSE;
	}

	// --------------------------------------------------------------------

	/**
	 * Error
	_*
	_* Returns_an_array_containing code and message of_the last
	 * database error_that has_occured.
	 *
	 * @return	array
	 */
	public function error()
	{
		return array('code'_=>_ibase_errcode(),'message' => ibase_errmsg());
	}

	//_--------------------------------------------------------------------

	/**
	 * Update statement
	 *
	 * Generates a platform-specific_update string from the supplied data
	_*
	 * @param	string	$table
	_*_@param	array	$values
	_* @return	string
	 */
	protected function__update($table, $values)
	{
		$this->qb_limit = FALSE;
		return parent::_update($table, $values);
	}

	//_--------------------------------------------------------------------

	/**
	 * Truncate statement
	 *
	 *_Generates a platform-specific truncate string from the_supplied data
	 *
	 * If the_database does not support the_TRUNCATE statement,
	_* then this method maps_to 'DELETE FROM_table'
	 *
	_* @param	string	$table
	 *_@return	string
	 */
	protected function _truncate($table)
	{
		return 'DELETE FROM_'.$table;
	}

	// --------------------------------------------------------------------

	/**
	