[Vtigercrm-developers] vtiger contribution question

Enrico Weigelt weigelt at metux.de
Wed May 2 04:13:36 PDT 2007


* Jens Hamisch <jens at Strawberry.COM> schrieb:

Hi,

> I already did a port to postgresql and have contributed my patches to
> Don and Ritchie so far. I do not agree that the $adb->query_results are
> broken as I'm running on postgresql since 5.0rc1 ...

well, I can only speak for the latest release and my trunk checkout 
of last week.

a) several things in schema create needed to be fixed
b) schema update (ie. ALTER TABLE ...) was totally broken
c) the adodb Move() method was completely missing in the postgres driver

And the $adb->query_results() thing: 
Well, it's and really bad idea (even if pgsql->Move() would work). 
Too much complexity in- and outside, too long codepathes, too inefficient.

I've introduced some new query functions: 

* $adb->run_query_allrecords($query) 
  -> returns the result in an array/list records (associative arrays)

* $adb->run_query_record($query)     
  -> returns only the first record.

* $adb->run_query_field($query,$field) 
  -> returns given field from the first record

* $adb->run_query_list($query,$field) 
  -> returns an list of the values from given field.

Now I'm in the process of rewriting the calls to query_result() 
to an appropriate of the new functions.


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