[ Index ] |
|
Code source de eGroupWare 1.2.106-2 |
[Code source] [Imprimer] [Statistiques]
(pas de description)
Poids: | 266 lignes (9 kb) |
Inclus ou requis: | 0 fois |
Référencé: | 0 fois |
Nécessite: | 1 fichier etemplate/inc/class.so_sql.inc.php |
soconstraints:: (5 méthodes):
soconstraints()
search()
read()
save()
delete()
Classe: soconstraints - X-Ref
Constraints storage object of the projectmanagersoconstraints($pm_id=null) X-Ref |
Constructor, calls the constructor of the extended class param: int $pm_id pm_id of the project to use, default null |
search($criteria,$only_keys=True,$order_by='',$extra_cols='',$wildcard='',$empty=False,$op='AND',$start=false,$filter=null,$join='') X-Ref |
searches db for rows matching searchcriteria, reimplemented to automatic add $this->pm_id '*' and '?' are replaced with sql-wildcards '%' and '_' param: array/string $criteria array of key and data cols, OR a SQL query (content for WHERE), fully quoted (!) param: boolean $only_keys=true True returns only keys, False returns all cols param: string $order_by='' fieldnames + {ASC|DESC} separated by colons ',', can also contain a GROUP BY (if it contains ORDER BY) param: string/array $extra_cols='' string or array of strings to be added to the SELECT, eg. "count(*) as num" param: string $wildcard='' appended befor and after each criteria param: boolean $empty=false False=empty criteria are ignored in query, True=empty have to be empty in row param: string $op='AND' defaults to 'AND', can be set to 'OR' too, then criteria's are OR'ed together param: mixed $start=false if != false, return only maxmatch rows begining with start, or array($start,$num) param: array $filter=null if set (!=null) col-data pairs, to be and-ed (!) into the query without wildcards param: string $join='' sql to do a join, added as is after the table-name, eg. ", table2 WHERE x=y" or return: array of matching rows (the row is an array of the cols) or False |
read($keys,$extra_cols='',$join='') X-Ref |
reads all constraints of a milestone (ms_id given), an element (pe_id given) or a project (pm_id given) It calls allways search to retrive the data. The form of the data returned depends on the given keys! param: array $keys array with keys in form internalName => value, may be a scalar value if only one key param: string/array $extra_cols string or array of strings to be added to the SELECT, eg. "count(*) as num" param: string $join='' sql to do a join, added as is after the table-name, eg. ", table2 WHERE x=y" or return: array/boolean milestones: array with pe_id's, element: array with subarrays for start, end, milestone, |
save($data=null) X-Ref |
saves the given data to the db param: array $data with either data for one row or null, or return: int 0 on success and errno != 0 else |
delete($keys=null) X-Ref |
reimplented to delete all constraints from a project-element if a pe_id is given param: array/int $keys if given array with col => value pairs to characterise the rows to delete or pe_id return: int affected rows, should be 1 if ok, 0 if an error |
Généré le : Sun Feb 25 17:20:01 2007 | par Balluche grâce à PHPXref 0.7 |