[ Index ] |
|
Code source de eGroupWare 1.2.106-2 |
[Code source] [Imprimer] [Statistiques]
(pas de description)
Poids: | 324 lignes (11 kb) |
Inclus ou requis: | 1 fois |
Référencé: | 0 fois |
Nécessite: | 1 fichier etemplate/inc/class.so_sql.inc.php |
sopricelist:: (6 méthodes):
sopricelist()
read()
sql_priority()
search()
save_price()
delete()
Classe: sopricelist - X-Ref
Pricelist storage object of the projectmanagersopricelist($pm_id=0) X-Ref |
Constructor, calls the constructor of the extended class param: int $pm_id=0 pm_id of the project to use, default 0 (project independent / standard prices) |
read($keys,$extra_cols='',$join=true) X-Ref |
reads one pricelist-itme specified by $keys, reimplemented to use $this->pm_id, if no pm_id given 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/boolean $join=true default join with links-table or string as in so_sql return: array/boolean data if row could be retrived else False |
sql_priority($pm_id=0,$col='pm_id',$use_general=true) X-Ref |
sql to define a priority depending on the relation-ship of the project the price was defined for to the given one The given project $pm_id has the highest priority, if $use_standard the standard-pricelist has priority 0 param: int $pm_id=0 project to use, default $this->pm_id param: string $col='pm_id' column-name to use, default 'pm_id', can be changed to use a table-name/-alias too param: boolean $use_general=true should the general-pricelist be included too (pm_id=0) return: string sql with CASE WHEN |
search($criteria,$only_keys=false,$order_by='pl_title',$extra_cols='',$wildcard='',$empty=False,$op='AND',$start=false,$filter=null,$join=true) X-Ref |
search elements, reimplemented to use $this->pm_id, if no pm_id given in criteria or filter and join with the prices table param: array/string $criteria array of key and data cols, OR a SQL query (content for WHERE), fully quoted (!) param: boolean $only_keys True returns only keys, False returns all cols param: string $order_by fieldnames + {ASC|DESC} separated by colons ',' 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=empty criteria are ignored in query, True=empty have to be empty in row param: string $op defaults to 'AND', can be set to 'OR' too, then criteria's are OR'ed together param: int/boolean $start if != false, return only maxmatch rows begining with start param: array $filter if set (!=null) col-data pairs, to be and-ed (!) into the query without wildcards param: string/boolean $join=true default join with prices-table or string as in so_sql return: array of matching rows (the row is an array of the cols) or False |
save_price(&$price,$touch_modified=true) X-Ref |
saves a single price param: array $price price-data param: boolean $touch_modified=true should the modififcation date and user be set param: int 0 on success, db::Errno otherwise |
delete($keys) X-Ref |
delete pricelist-entries and price(s) specified by keys pl_id, pm_id and/or pl_validsince If the last price of a pricelist-entry gets deleted, the pricelist entry is automatic deleted too! param: array/int $keys array with keys pm_id, pl_id and/or pl_validsince to delete or integer pm_id return: int number of deleted prices |
Généré le : Sun Feb 25 17:20:01 2007 | par Balluche grâce à PHPXref 0.7 |