class Results (View source)

Handle all the functionalities related to displaying results of sql queries, stored procedure, browsing sql processes or displaying binary log.

Constants

POSITION_LEFT

POSITION_RIGHT

POSITION_BOTH

POSITION_NONE

DISPLAY_FULL_TEXT

DISPLAY_PARTIAL_TEXT

RELATIONAL_KEY

RELATIONAL_DISPLAY_COLUMN

GEOMETRY_DISP_GEOM

GEOMETRY_DISP_WKT

GEOMETRY_DISP_WKB

SMART_SORT_ORDER

ASCENDING_SORT_DIR

DESCENDING_SORT_DIR

TABLE_TYPE_INNO_DB

ALL_ROWS

ACTION_LINK_CONTENT_ICONS

ACTION_LINK_CONTENT_TEXT

Properties

Template $template

Methods

__construct(DatabaseInterface $dbi, Config $config, string $db, string $table, int $server, string $goto, string $sqlQuery)

No description

void
setProperties(int|string $unlimNumRows, array $fieldsMeta, bool $isCount, bool $isExport, bool $isFunction, bool $isAnalyse, int|string $numRows, float $queryTime, string $textDirection, bool $isMaintenance, bool $isExplain, bool $isShow, bool $printView, bool $editable, bool $isBrowseDistinct)

Set properties which were not initialized at the constructor

void
setConfigParamsForDisplayTable(StatementInfo $statementInfo)

Checks the posted options for viewing query results and sets appropriate values in the session.

string
getTable(ResultInterface $dtResult, DisplayParts $displayParts, StatementInfo $statementInfo, bool $isLimitedDisplay = false)

Prepare a table of results returned by a SQL query.

Details

__construct(DatabaseInterface $dbi, Config $config, string $db, string $table, int $server, string $goto, string $sqlQuery)

No description

Parameters

DatabaseInterface $dbi
Config $config
string $db

the database name

string $table

the table name

int $server

the server id

string $goto

the URL to go back in case of errors

string $sqlQuery

the SQL query

void setProperties(int|string $unlimNumRows, array $fieldsMeta, bool $isCount, bool $isExport, bool $isFunction, bool $isAnalyse, int|string $numRows, float $queryTime, string $textDirection, bool $isMaintenance, bool $isExplain, bool $isShow, bool $printView, bool $editable, bool $isBrowseDistinct)

Set properties which were not initialized at the constructor

Parameters

int|string $unlimNumRows

the total number of rows returned by the SQL query without any appended "LIMIT" clause programmatically

array $fieldsMeta

meta information about fields

bool $isCount

statement is SELECT COUNT

bool $isExport

statement contains INTO OUTFILE

bool $isFunction

statement contains a function like SUM()

bool $isAnalyse

statement contains PROCEDURE ANALYSE

int|string $numRows

total no. of rows returned by SQL query

float $queryTime

time taken for execute the SQL query

string $textDirection

text direction

bool $isMaintenance

statement contains a maintenance command

bool $isExplain

statement contains EXPLAIN

bool $isShow

statement contains SHOW

bool $printView

print view was requested

bool $editable

whether the results set is editable

bool $isBrowseDistinct

whether browsing distinct values

Return Value

void

void setConfigParamsForDisplayTable(StatementInfo $statementInfo)

Checks the posted options for viewing query results and sets appropriate values in the session.

make maximum remembered queries configurable move/split into SQL class!? currently this is called twice unnecessary ignore LIMIT and ORDER in query!?

Parameters

StatementInfo $statementInfo

Return Value

void

string getTable(ResultInterface $dtResult, DisplayParts $displayParts, StatementInfo $statementInfo, bool $isLimitedDisplay = false)

Prepare a table of results returned by a SQL query.

Parameters

ResultInterface $dtResult

the link id associated to the query which results have to be displayed

DisplayParts $displayParts
StatementInfo $statementInfo
bool $isLimitedDisplay

With limited operations or not

Return Value

string

Generated HTML content for resulted table