Platform
3.1
PHP API documentation
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Pages
Class.DocCount.php
Go to the documentation of this file.
1
<?php
2
/*
3
* @author Anakeen
4
* @license http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ Anakeen - licence CC
5
* @package FDL
6
*/
7
/**
8
* Cache table to memorize count doc of different sql filter
9
*
10
* @author Anakeen 2008
11
* @version $Id: Class.DocCount.php,v 1.1 2008/08/13 15:17:07 eric Exp $
12
* @license http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ Anakeen - licence CC
13
* @package FDL
14
*/
15
/**
16
*/
17
18
include_once (
"Class.DbObj.php"
);
19
20
class
DocCount
extends
DbObj
21
{
22
public
$fields
= array(
23
"famid"
,
// family identificator
24
"aid"
,
// attribute identificator
25
"filter"
,
// sql filter
26
"c"
,
// count
27
28
);
29
/**
30
* family identificator
31
* @public string
32
*/
33
public
$famid
;
34
/**
35
* attribute identificator
36
* @public string
37
*/
38
public
$aid
;
39
/**
40
* sql filter of the query
41
* @public string
42
*/
43
public
$filter
;
44
/**
45
* count result
46
* @public int
47
*/
48
public
$c
;
49
50
public
$id_fields
= array(
51
"famid"
,
52
"aid"
,
53
"filter"
54
);
55
56
public
$dbtable
=
"doccount"
;
57
58
public
$sqlcreate
=
"
59
create table doccount ( famid int not null,
60
aid text not null,
61
filter text not null,
62
c int );
63
create index i_doccount on dochisto(famid,aid);
64
"
;
65
66
function
deleteAll
()
67
{
68
$sql
= sprintf(
"delete from %s where famid = %s and aid = '%s'"
, $this->dbtable, $this->famid, pg_escape_string($this->aid));
69
70
return
$this->
exec_query
(
$sql
);
71
}
72
}
73
?>
← centre documentaire
© anakeen
- published under
CC License
-
Dynacase