Le mardi 26 février 2008 à 22:42 +1100, Dave Hall a écrit : > Hi all, >
> The ideas should be for generic API functionality which is useful across > modules or a new feature for a module which should be attractive to a > broad section of our user base. > > So start thinking and suggesting :) > Hi, for picoforge v2, I have writen a generic classe called sqltable that manages any sqltable. My first aim was to avoid errors in insert or select clauses, when one asks for a bad field. This sqltable, provides sql statements (select, insert) and other methods like count. Soclasses then derives from this class, with a generic way of calling function (see bits of code). Advantages: this is very simple to add a table and manage it with a soclass, there is only one class to fix when there is a sql bug. Potential problems: this class introduces an overhead due to the parsing of parameters, it has only be tested with mysql even though it uses the db class of phpgroupware. Now an idea for a summer of code: try to integrate that generic class to some soclasses in phpgroupware. The class.sqltable is attached, and example of soclass is also attached. C.Bac
class.sqltable.inc.php
Description: application/php
class.project_so.inc.php
Description: application/php
_______________________________________________ phpGroupWare-developers mailing list [email protected] http://lists.gnu.org/mailman/listinfo/phpgroupware-developers
