Function to get the sql query for index creation or edit
public getSqlQueryForIndexCreateOrEdit ( |
||
$index | current index | |
Résultat | string |
/** * Tests for getSqlQueryForIndexCreateOrEdit() method. * * @return void * @test */ public function testGetSqlQueryForIndexCreateOrEdit() { $db = "pma_db"; $table = "pma_table"; $index = new PMA\libraries\Index(); $error = false; $_REQUEST['old_index'] = "PRIMARY"; $table = new Table($table, $db); $sql = $table->getSqlQueryForIndexCreateOrEdit($index, $error); $this->assertEquals("ALTER TABLE `pma_db`.`pma_table` DROP PRIMARY KEY, ADD UNIQUE ;", $sql); }