Core  3.2
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
initializeDocrelTable.php File Reference

Go to the source code of this file.

Functions

if($parms['transaction']) sqlexec (&$dbobj, &$parms, $sql)
 

Variables

global $appl
 
global $action
 
 $dbaccess = $action->dbaccess
 
if($dbaccess=="") $o = new DbObj($dbaccess)
 
if(!is_object($o)) $parms = array()
 
 $usage = new ApiUsage()
 
 $parms ['dryrun'] = $usage->addEmptyParameter("dryrun", "Only output SQL queries that would be executed")
 
if($parms['dryrun']== 'yes'||$parms['dryrun']===true) else
 
 $parms ['famid'] = $usage->addOptionalParameter("famid", "Process all families (keyword 'all') or only a specific family (family name or family id)", array() , "all")
 
if($parms['famid']!= 'all') $parms ['transaction'] = $usage->addEmptyParameter("transaction", "Execute whole operation in a single transaction")
 
 $parms ['realclean'] = $usage->addHiddenParameter("realclean", "Delete everything in docrel at the beginning of the operation - old yes/no")
 
 $parms ['softclean'] = $usage->addEmptyParameter("softclean", "Don't delete everything in decrel before begin operation")
 
 $q = new QueryDb($dbaccess, "DocAttr")
 
$q order_by = '(docid, id)'
 
if(is_numeric($parms['famid'])) $attrList = $q->Query(0, 0, "TABLE")
 

Function Documentation

if ($parms['transaction']) sqlexec ( $dbobj,
$parms,
  $sql 
)

Commit transaction if required

Parameters
DbObj$dbobj
array$parms
string$sql
Returns
string

Definition at line 181 of file initializeDocrelTable.php.

Variable Documentation

global $action

Definition at line 10 of file initializeDocrelTable.php.

global $appl

Reinit doc relations

Definition at line 10 of file initializeDocrelTable.php.

if (is_numeric($parms['famid'])) $attrList = $q->Query(0, 0, "TABLE")

Definition at line 87 of file initializeDocrelTable.php.

$dbaccess = $action->dbaccess

Setup main db connection

Definition at line 19 of file initializeDocrelTable.php.

if ($dbaccess=="") $o = new DbObj($dbaccess)

Definition at line 23 of file initializeDocrelTable.php.

if (!is_object($o)) $parms = array()

Parse arguments

Definition at line 30 of file initializeDocrelTable.php.

$parms['dryrun'] = $usage->addEmptyParameter("dryrun", "Only output SQL queries that would be executed")

Definition at line 34 of file initializeDocrelTable.php.

$parms['famid'] = $usage->addOptionalParameter("famid", "Process all families (keyword 'all') or only a specific family (family name or family id)", array() , "all")

Definition at line 41 of file initializeDocrelTable.php.

if ($parms['famid']!= 'all') $parms['transaction'] = $usage->addEmptyParameter("transaction", "Execute whole operation in a single transaction")

Definition at line 56 of file initializeDocrelTable.php.

$parms['realclean'] = $usage->addHiddenParameter("realclean", "Delete everything in docrel at the beginning of the operation - old yes/no")

Definition at line 63 of file initializeDocrelTable.php.

$parms['softclean'] = $usage->addEmptyParameter("softclean", "Don't delete everything in decrel before begin operation")

Definition at line 64 of file initializeDocrelTable.php.

$q = new QueryDb($dbaccess, "DocAttr")

Load all docid attributes

Definition at line 79 of file initializeDocrelTable.php.

$usage = new ApiUsage()

Definition at line 31 of file initializeDocrelTable.php.

if ($parms['realclean']== 'yes'&&$parms['famid']== 'all') else
Initial value:
{
$parms['dryrun'] = false
if(!is_object($o)) $parms

Definition at line 37 of file initializeDocrelTable.php.

$q order_by = '(docid, id)'

Definition at line 80 of file initializeDocrelTable.php.

← centre documentaire © anakeen