[ PHPXref.com ] [ Generated: Sun Jul 20 17:59:13 2008 ] [ GLPI 0.65 ]
[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/glpi/common/ -> functions_db.php (summary)

(no description)

File Size: 564 lines (14 kb)
Included or required: 3 times
Referenced: 0 times
Includes or requires: 0 files

Defines 18 functions

  searchUserbyType()
  countElementsInTable()
  getTreeLeafValueName()
  getTreeValueCompleteName()
  getTreeValueName()
  getRealSearchForTreeItem()
  getRealQueryForTreeItem()
  getTreeItemLevel()
  regenerateTreeCompleteName()
  regenerateTreeCompleteNameUnderID()
  getNextItem()
  getPreviousItem()
  getUserName()
  TableExists()
  FieldExists()
  isIndex()
  exportArrayToDB()
  importArrayFromDB()

Functions
Functions that are not part of a class:

searchUserbyType($authtype)   X-Ref
Make a "where" clause for a mysql query on user table

Return a string witch contain the where clause, for a query
under the glpi_users table, witch return users that have the right $authtype.


returns: : string (in order to construct a SQL where clause)
param: $authtype auth type

countElementsInTable($table)   X-Ref
Count the number of elements in a table.

param: $table table name

getTreeLeafValueName($table,$ID,$withcomments=0)   X-Ref
Get the Name of the element of a Dropdown Tree table

param: $table : Dropdown Tree table
param: $ID : ID of the element
param: $withcomments : 1 if you want to give the array with the comments
return: string : name of the element

getTreeValueCompleteName($table,$ID,$withcomments=0)   X-Ref
Get completename of a Dropdown Tree table

param: $table : Dropdown Tree table
param: $ID : ID of the element
param: $withcomments : 1 if you want to give the array with the comments
return: string : completename of the element

getTreeValueName($table,$ID, $wholename="")   X-Ref
show name catégory

param: $table
param: $ID
param: $wholename
return: string name

getRealSearchForTreeItem($table,$search)   X-Ref
Get the equivalent search query using ID that the search of the string argument

param: $table
param: $search the search string value
return: string the query

getRealQueryForTreeItem($table,$IDf)   X-Ref
Get the equivalent search query using ID of soons that the search of the father's ID argument

param: $table
param: $IDf The ID of the father
return: string the query

getTreeItemLevel($table,$ID)   X-Ref
Get the level for an item in a tree structure

param: $table
param: $ID
return: int level

regenerateTreeCompleteName($table)   X-Ref
Compute all completenames of Dropdown Tree table

param: $table : dropdown tree table to compute
return: nothing

regenerateTreeCompleteNameUnderID($table,$ID)   X-Ref
Compute completename of Dropdown Tree table under the element of ID $ID

param: $table : dropdown tree table to compute
param: $ID : root ID to used : regenerate all under this element
return: nothing

getNextItem($table,$ID)   X-Ref
Get the ID of the next Item

param: $table table to search next item
param: $ID current ID
return: the next ID, -1 if not exist

getPreviousItem($table,$ID)   X-Ref
Get the ID of the previous Item

param: $table table to search next item
param: $ID current ID
return: the previous ID, -1 if not exist

getUserName($ID,$link=0)   X-Ref
Get name of the user with ID=$ID (optional with link to users-info.php)

param: $ID int : ID of the user.
param: $link int : 1 = Show link to users-info.php 2 = return array with comments and link
return: string : username string (realname if not empty and name if realname is empty).

TableExists($tablename)   X-Ref
Verify if a DB table exists

param: $tablename string : Name of the table we want to verify.
return: bool : true if exists, false elseway.

FieldExists($table, $field)   X-Ref
Verify if a DB field exists

param: $table string : Name of the table we want to verify.
param: $field string : Name of the field we want to verify.
return: bool : true if exists, false elseway.

isIndex($table, $field)   X-Ref
No description

exportArrayToDB($TAB)   X-Ref
No description

importArrayFromDB($DATA)   X-Ref
No description



[ Powered by PHPXref - Served by Debian GNU/Linux ]