sub-pages links on browse
This commit is contained in:
@@ -11,6 +11,7 @@ $Source$
|
||||
|
||||
2002-06-26 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* Documentation.html: update the persons/towns/countries example
|
||||
* sql.php3, tbl_properties_table_info.php3: sub-page links on browse
|
||||
|
||||
2002-06-26 Olivier L. M<>ller <om@omnis.ch>
|
||||
* tbl_change.php3: display the submit button every 15 lines:
|
||||
|
13
sql.php3
13
sql.php3
@@ -1,14 +1,12 @@
|
||||
<?php
|
||||
/* $Id$ */
|
||||
|
||||
|
||||
/**
|
||||
* Gets some core libraries
|
||||
*/
|
||||
require('./libraries/grab_globals.lib.php3');
|
||||
require('./libraries/common.lib.php3');
|
||||
|
||||
|
||||
/**
|
||||
* Defines the url to return to in case of error in a sql statement
|
||||
*/
|
||||
@@ -92,6 +90,11 @@ $sql_query = PMA_sqlFormat($sql_query);
|
||||
// query may contain aliases.
|
||||
// (todo: check for embedded comments...)
|
||||
|
||||
// (todo: if there are more than one table name in the Select:
|
||||
// - do not extract the first table name
|
||||
// - do not show a table name in the page header
|
||||
// - do not display the sub-pages links)
|
||||
|
||||
$is_select = eregi('^SELECT[[:space:]]+', $sql_query);
|
||||
if ($is_select) {
|
||||
eregi('^SELECT[[:space:]]+(.*)[[:space:]]+FROM[[:space:]]+(`[^`]+`|[A-Za-z0-9_$]+)([\.]*)(`[^`]*`|[A-Za-z0-9_$]*)', $sql_query, $tmp);
|
||||
@@ -107,7 +110,6 @@ if ($is_select) {
|
||||
}
|
||||
} // end if
|
||||
|
||||
|
||||
/**
|
||||
* Sets or modifies the $goto variable if required
|
||||
*/
|
||||
@@ -425,8 +427,9 @@ else {
|
||||
include('./header_printview.inc.php3');
|
||||
} else {
|
||||
$js_to_run = 'functions.js';
|
||||
include('./header.inc.php3');
|
||||
include('./libraries/bookmark.lib.php3');
|
||||
unset($message);
|
||||
include('./tbl_properties_common.php3');
|
||||
include('./tbl_properties_table_info.php3');
|
||||
include('./libraries/relation.lib.php3');
|
||||
$cfgRelation = PMA_getRelationsParam();
|
||||
}
|
||||
|
@@ -8,8 +8,8 @@
|
||||
// The 'show table' statement works correct since 3.23.03
|
||||
if (PMA_MYSQL_INT_VERSION >= 32303) {
|
||||
$local_query = 'SHOW TABLE STATUS LIKE \'' . PMA_sqlAddslashes($table, TRUE) . '\'';
|
||||
$result = PMA_mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url_0);
|
||||
$showtable = PMA_mysql_fetch_array($result);
|
||||
$table_info_result = PMA_mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url_0);
|
||||
$showtable = PMA_mysql_fetch_array($table_info_result);
|
||||
$tbl_type = strtoupper($showtable['Type']);
|
||||
$num_rows = (isset($showtable['Rows']) ? $showtable['Rows'] : 0);
|
||||
$show_comment = (isset($showtable['Comment']) ? $showtable['Comment'] : '');
|
||||
@@ -27,12 +27,12 @@ if (PMA_MYSQL_INT_VERSION >= 32303) {
|
||||
unset($tmp);
|
||||
} else {
|
||||
$local_query = 'SELECT COUNT(*) AS count FROM ' . PMA_backquote($table);
|
||||
$result = PMA_mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url_0);
|
||||
$table_info_result = PMA_mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url_0);
|
||||
$showtable = array();
|
||||
$num_rows = PMA_mysql_result($result, 0, 'count');
|
||||
$num_rows = PMA_mysql_result($table_info_result, 0, 'count');
|
||||
$show_comment = '';
|
||||
}
|
||||
mysql_free_result($result);
|
||||
mysql_free_result($table_info_result);
|
||||
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user