⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.103
Server IP:
45.79.8.107
Server:
Linux localhost 5.15.0-161-generic #171-Ubuntu SMP Sat Oct 11 08:17:01 UTC 2025 x86_64
Server Software:
nginx/1.18.0
PHP Version:
8.1.2-1ubuntu2.22
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
phpmyadmin
/
libraries
/
classes
/
Query
/
View File Name :
Generator.php
\'InnoDB\', t.DATA_FREE, 0)) AS SCHEMA_DATA_FREE'; } $sql .= ' FROM `information_schema`.SCHEMATA s '; if ($forceStats) { $sql .= ' LEFT JOIN `information_schema`.TABLES t' . ' ON BINARY t.TABLE_SCHEMA = BINARY s.SCHEMA_NAME'; } $sql .= $sqlWhereSchema . ' GROUP BY BINARY s.SCHEMA_NAME, s.DEFAULT_COLLATION_NAME' . ' ORDER BY '; if ($sortBy === 'SCHEMA_NAME' || $sortBy === 'DEFAULT_COLLATION_NAME') { $sql .= 'BINARY '; } $sql .= Util::backquote($sortBy) . ' ' . $sortOrder . $limit; $sql .= ') a'; return $sql; } public static function getInformationSchemaColumnsFullRequest( ?string $escapedDatabase, ?string $escapedTable, ?string $escapedColumn ): array { $sqlWheres = []; $arrayKeys = []; // get columns information from information_schema if ($escapedDatabase !== null) { $sqlWheres[] = '`TABLE_SCHEMA` = \'' . $escapedDatabase . '\' '; } else { $arrayKeys[] = 'TABLE_SCHEMA'; } if ($escapedTable !== null) { $sqlWheres[] = '`TABLE_NAME` = \'' . $escapedTable . '\' '; } else { $arrayKeys[] = 'TABLE_NAME'; } if ($escapedColumn !== null) { $sqlWheres[] = '`COLUMN_NAME` = \'' . $escapedColumn . '\' '; } else { $arrayKeys[] = 'COLUMN_NAME'; } // for PMA bc: // `[SCHEMA_FIELD_NAME]` AS `[SHOW_FULL_COLUMNS_FIELD_NAME]` $sql = 'SELECT *,' . ' `COLUMN_NAME` AS `Field`,' . ' `COLUMN_TYPE` AS `Type`,' . ' `COLLATION_NAME` AS `Collation`,' . ' `IS_NULLABLE` AS `Null`,' . ' `COLUMN_KEY` AS `Key`,' . ' `COLUMN_DEFAULT` AS `Default`,' . ' `EXTRA` AS `Extra`,' . ' `PRIVILEGES` AS `Privileges`,' . ' `COLUMN_COMMENT` AS `Comment`' . ' FROM `information_schema`.`COLUMNS`'; if (count($sqlWheres)) { $sql .= "\n" . ' WHERE ' . implode(' AND ', $sqlWheres); } return [$sql, $arrayKeys]; } /** * Function to get sql query for renaming the index using SQL RENAME INDEX Syntax */ public static function getSqlQueryForIndexRename( string $dbName, string $tableName, string $oldIndexName, string $newIndexName ): string { return sprintf( 'ALTER TABLE %s.%s RENAME INDEX %s TO %s;', Util::backquote($dbName), Util::backquote($tableName), Util::backquote($oldIndexName), Util::backquote($newIndexName) ); } }