/**
  * Tests for PMA_getTableLastVersionNumber() method.
  *
  * @return void
  * @test
  */
 public function testPMAGetTableLastVersionNumber()
 {
     $sql_result = "sql_result";
     $last_version = PMA_getTableLastVersionNumber($sql_result);
     $this->assertEquals("10", $last_version);
 }
Ejemplo n.º 2
0
/*
 * List selectable tables
 */
$selectable_tables_sql_result = PMA_getSQLResultForSelectableTables();
if ($GLOBALS['dbi']->numRows($selectable_tables_sql_result) > 0) {
    $html .= PMA_getHtmlForSelectableTables(
        $selectable_tables_sql_result, $url_query
    );
}
$html .= '<br />';

/*
 * List versions of current table
 */
$sql_result = PMA_getListOfVersionsOfTable();
$last_version = PMA_getTableLastVersionNumber($sql_result);
if ($last_version > 0) {
    $html .= PMA_getHtmlForTableVersionDetails(
        $sql_result, $last_version, $url_params,
        $url_query, $pmaThemeImage, $text_dir
    );
}

$type = $GLOBALS['dbi']->getTable($GLOBALS['db'], $GLOBALS['table'])
    ->isView() ? 'view' : 'table';
$html .= PMA_getHtmlForDataDefinitionAndManipulationStatements(
    'tbl_tracking.php' . $url_query,
    $last_version,
    $GLOBALS['db'],
    array($GLOBALS['table']),
    $type