phpgroupware-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Phpgroupware-developers] null return values in sql_entity


From: Dirk Schaller
Subject: RE: [Phpgroupware-developers] null return values in sql_entity
Date: Thu, 2 Sep 2004 09:17:53 +0200

> >The PHPGW_SQL_RUN_SQL case should be something like:
> >     return $GLOBALS['phpgw']->db->query($sql, __LINE__, __FILE__);
> >
> >A true or false return values or the number of affected rows 
> >is better than >null.
> >What do you thing about? Could it be realized in a next version?
> >
> >  
> >
> I think it should. Returning return; is ugly, dull and error prone. I 
> think the rationale was that there is an assertions
> class that further forward in the system can check for isnull 
> ... so... in any case, there isnt much to change anyhow.

Okay then the contacts backend should use such a class. Outside the
backend I couldt handle any error, because there are many db queries
in some functions and they handle nothing. They get the null from sql
entity and return it. Or sometimes they get it and return anything else.
And for API classes that isnt the finest way.

Dirk




reply via email to

[Prev in Thread] Current Thread [Next in Thread]