[Vtigercrm-developers] vtiger contribution question

Enrico Weigelt weigelt at metux.de
Wed May 2 19:36:53 PDT 2007


* Jorge Torres <jorge.torres.maldonado at gmail.com> schrieb:

Hi,

> Since it is now clear that postgres is supported, the only thing would be
> about Enrico's opinion of adb->query_results being resource wasting, which
> is very important regardless of mysql or postgres use,  Enrico,  what are
> you doing instead of using the query_results method?

As already said: introduced some new functions, which fetch either 
one record (run_query_record() and run_query_field()) or all records
(run_query_allrecords() and run_query_list()) and simply return the data.

There are several result types:

a) just one scalar:	-> run_query_field($query,$fieldname)
			    --> returns an scalar
b) just one record:	-> run_query_record($query)
			    --> returns an associative array
c) an list of scalars	-> run_query_list($query,$fieldname)
			    --> returns an array/list of scalars
d) an list of records:	-> run_query_allreords($query)
			    --> returns an array/list of ass. arrays

cu
-- 
---------------------------------------------------------------------
 Enrico Weigelt    ==   metux IT service

  phone:     +49 36207 519931         www:       http://www.metux.de/
  fax:       +49 36207 519932         email:     contact at metux.de
  cellphone: +49 174 7066481
---------------------------------------------------------------------
 -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops --
---------------------------------------------------------------------



More information about the vtigercrm-developers mailing list