Jinya CMS

DatabaseAnalyzer
in package

This class analyzes the database and allows to retrieve database information

Tags

Table of Contents

getServerInfo()  : array<string, string>
Gets the information for the current database server. This information includes the version and the OS and architecture the server was compiled on
getTables()  : array<int|string, array<string, mixed|int|string>>
Gets all tables currently present in the active database
getVariables()  : array<int|string, mixed>
Gets the variables of the database server for one of the variable types
executeSqlString()  : array<string|int, mixed>|int
fetchInt()  : int
fetchString()  : string

Methods

getServerInfo()

Gets the information for the current database server. This information includes the version and the OS and architecture the server was compiled on

public static getServerInfo() : array<string, string>
Tags
Return values
array<string, string>

An array containing the version, the comment, the machine and OS the database was compiled on

getTables()

Gets all tables currently present in the active database

public static getTables() : array<int|string, array<string, mixed|int|string>>
Tags
throws
Exception
Return values
array<int|string, array<string, mixed|int|string>>

An array of the tables and their fields

getVariables()

Gets the variables of the database server for one of the variable types

public static getVariables(VariablesType $type) : array<int|string, mixed>
Parameters
$type : VariablesType
Tags
Return values
array<int|string, mixed>

executeSqlString()

private static executeSqlString(string $sql) : array<string|int, mixed>|int
Parameters
$sql : string
Tags
Return values
array<string|int, mixed>|int

fetchInt()

private static fetchInt(SelectInterface $query, string $column) : int
Parameters
$query : SelectInterface
$column : string
Tags
Return values
int

fetchString()

private static fetchString(SelectInterface $query, string $column) : string
Parameters
$query : SelectInterface
$column : string
Tags
Return values
string

Search results