From 5c1052ad9692ecb1888da2f1e230bddd8d9ab5b3 Mon Sep 17 00:00:00 2001 From: ninadsp Date: Thu, 1 Jul 2010 02:33:31 +0530 Subject: [PATCH] Included the sql.js file, added teh container division sqlqueryresults when generating the results table. All cases have not been handled yet. --- sql.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/sql.php b/sql.php index f29a81e47..12c026eae 100755 --- a/sql.php +++ b/sql.php @@ -312,6 +312,11 @@ if (isset($GLOBALS['show_as_php']) || !empty($GLOBALS['validatequery'])) { } $active_page = $goto; $message = htmlspecialchars(PMA_Message::rawError($error)); + + if( $GLOBALS['is_ajax_request'] == true) { + PMA_ajaxResponse($message, false); + } + /** * Go to target path. */ @@ -580,6 +585,7 @@ else { require_once './libraries/header_printview.inc.php'; } else { $GLOBALS['js_include'][] = 'functions.js'; + $GLOBALS['js_include'][] = 'sql.js'; unset($message); if( $GLOBALS['is_ajax_request'] != true) { if (strlen($table)) { @@ -607,12 +613,17 @@ else { $fields_meta = PMA_DBI_get_fields_meta($result); $fields_cnt = count($fields_meta); } + + if( $GLOBALS['is_ajax_request'] != true ) { + //begin the sqlqueryresults div here. container div + echo '
'; + } // Display previous update query (from tbl_replace) if (isset($disp_query) && $cfg['ShowSQL'] == true) { PMA_showMessage($disp_message, $disp_query, 'success'); } - + if (isset($profiling_results)) { PMA_profilingResults($profiling_results); } @@ -709,6 +720,10 @@ window.onload = function() '; // end sqlqueryresults div + } } // end rows returned /**