ultimix

- Main Page
- Data Structures
- Files
- Examples

- Data Structures
- Data Structure Index
- Data Fields

Public Member Functions | Data Fields | Static Public Attributes
database_logger_1_0_0 Class Reference

## Public Member Functions
| __construct ()
| set_query_name ($theQueryName)
| log_query ($Query, $Start, $DBLogging)

## Data Fields
| $UserAlgorithms = false

## Static Public Attributes
static | $QueryName = 'undefined'

## Detailed Description

Class providees routine for database manipulation.

Author
  Dodonov A.A.

Definition at line 26 of file database_logger.php.

## Constructor & Destructor Documentation

__construct | ( |  | ) |

Constructor.

Exceptions

  Exception | An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 66 of file database_logger.php.

{
try
{
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

## Member Function Documentation

log_query | ( |  | $Query,
|  |  | $Start,
|  |  | $DBLogging
| ) |  |

Function logs query.

Parameters

  $Query | - Query string.
  $Start | - Query execution start time.
  $DBLogging | - Need logging.

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 159 of file database_logger.php.

{
try
{
$End = microtime( true );
if( $DBLogging )
{
$Owner = $this->get_owner();
$DBO->query(
"INSERT INTO umx_action ".
"( alias , description , owner , ip , action_date, execute_time , session ) VALUES ( '".
htmlspecialchars( self::$QueryName , ENT_QUOTES )."' , '".
htmlspecialchars( $Query , ENT_QUOTES )."' , '$Owner' , '".$_SERVER[ 'REMOTE_ADDR' ].
"' , NOW() , '".( $End - $Start )."' , '".self::$Session."' )"
);
$DBO->query( 'COMMIT' );
}
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

set_query_name | ( |  | $theQueryName | ) |

Setting query name.

Parameters

  $theQueryName | - имя запроса.

Author
  Додонов А.А.

Definition at line 91 of file database_logger.php.

{
self::$QueryName = $theQueryName;
}

## Field Documentation

$QueryName = 'undefined'
| static

Query's name.

Author
  Dodonov A.A.

Definition at line 50 of file database_logger.php.

$UserAlgorithms = false

Database object.

Author
  Dodonov A.A.

Definition at line 38 of file database_logger.php.

The documentation for this class was generated from the following file:

- packages/database/packages/database_logger/database_logger.php