]> git.joonet.de Git - adminer.git/commitdiff
Search in all tables
authorjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Wed, 3 Feb 2010 15:30:52 +0000 (15:30 +0000)
committerjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Wed, 3 Feb 2010 15:30:52 +0000 (15:30 +0000)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1302 7c3ca157-0c34-0410-bff1-cbf682f78f5c

changes.txt
editor/db.inc.php
todo.txt

index 3fd63a9ec6b97f80029b3bbdbae97abcf70eb2fd..36ebe243877cf28643dceef6402d855102b35187 100644 (file)
@@ -1,8 +1,10 @@
 Adminer 2.3.0-dev:
 Support for permanent login (customization required)
+Search in all tables (Editor)
 Show status variables
 Print sums in tables overview
 Add Delete button to Edit page (regression from 2.0.0)
+Print error summary in SQL command
 Simplify SQL syntax error message
 Show SQL query info if available
 Delete length when changing type in alter table
index dd581163c7880407db0257cf641daf12e76c3c1f..4a8e990bcc126b2da216b5534040de68edc751f4 100644 (file)
@@ -1,2 +1,27 @@
 <?php
 page_header(lang('Server'), "", null);
+
+?>
+<form action=""><p>
+<?php if (SID) { ?><input type="hidden" name="<?php echo session_name(); ?>" value="<?php echo h(session_id()); ?>"><?php } ?>
+<input name="where[][val]" value="<?php echo h($_GET["where"][0]["val"]); ?>">
+<input type="submit" value="<?php echo lang('Search'); ?>" />
+</form>
+<?php
+if ($_GET["where"]) {
+       $found = false;
+       foreach (table_status() as $table => $table_status) {
+               $name = $adminer->tableName($table_status);
+               if (isset($table_status["Engine"]) && $name != "") {
+                       $result = $connection->query("SELECT 1 FROM " . idf_escape($table) . " WHERE " . implode(" AND ", $adminer->selectSearchProcess(fields($table), array())) . " LIMIT 1");
+                       if ($result->num_rows) {
+                               if (!$found) {
+                                       echo "<ul>\n";
+                                       $found = true;
+                               }
+                               echo "<li><a href='" . h(ME . "select=" . urlencode($table) . "&where[][val]=" . urlencode($_GET["where"][0]["val"])) . "'>" . h($name) . "</a>\n";
+                       }
+               }
+       }
+       echo ($found ? "</ul>" : "<p class='message'>" . lang('No tables.')) . "\n";
+}
index fb0a384c543118c19689093bd670a52a26c4a700..fd0cc1ba4e6af7ed940b3de5869f8acb87c1ba07 100644 (file)
--- a/todo.txt
+++ b/todo.txt
@@ -9,6 +9,7 @@ Variables editation, especially timezone
 Use event $intervals + microseconds in relative date functions
 Optionally check IP address
 Disable spell checking in SQL textareas - spellcheck="false"
+Blob download and image display in edit form (important for Editor with hidden fields in select)
 ? Column and table names auto-completition in SQL textarea
 ? Aliasing of built-in functions can save 7 KB, function minification can save 7 KB, substitution of repetitive $a["a"] can save 4 KB, substitution of $_GET and friends can save 2 KB, JS packer can save 1 KB, not enclosing HTML attribute values can save 1.2 KB, replacing \\n by \n can save .3 KB
 ? Branch binary_compile: LZW compression of translations can save 30 KB, LZW compression of all texts can save 11 KB, remove of base64_decode() + using chars 127-255 in minification can save 1 KB