Browse files

Use LIKE operator in Editor

Typos

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@921 7c3ca157-0c34-0410-bff1-cbf682f78f5c
  • Loading branch information...
1 parent fa7b86c commit 201142850ee4a92d070f57eb4b3ebadad1b56ad3 jakubvrana committed Jul 28, 2009
Showing with 3 additions and 3 deletions.
  1. +1 −1 adminer/include/adminer.inc.php
  2. +2 −2 editor/include/adminer.inc.php
View
2 adminer/include/adminer.inc.php
@@ -127,7 +127,7 @@ function selectVal($val, $link, $field) {
/** Value conversion used in select and edit
* @param string
* @param array single field returned from fields()
- * @return
+ * @return string
*/
function editVal($val, $field) {
return $val;
View
4 editor/include/adminer.inc.php
@@ -188,7 +188,7 @@ function selectSearchProcess($indexes, $fields) {
foreach ((array) $_GET["where"] as $val) {
if (strlen("$val[col]$val[val]")) {
$value = $this->processInput($fields[$val["col"]], $val["val"]);
- $cond = ($value == "NULL" ? " IS $value" : " = $value");
+ $cond = ($value == "NULL" ? " IS" : ($val["op"] == "=" ? " =" : " LIKE")) . " $value";
if (strlen($val["col"])) {
$return[] = idf_escape($val["col"]) . $cond;
} else {
@@ -208,7 +208,7 @@ function selectSearchProcess($indexes, $fields) {
function selectOrderProcess($columns, $select, $indexes) {
return ($_GET["order"]
- ? idf_escape($_GET["order"][0]) . (isset($_GET["desc"][0]) ? " DESC" : "")
+ ? array(idf_escape($_GET["order"][0]) . (isset($_GET["desc"][0]) ? " DESC" : ""))
: $indexes[$_GET["index_order"]]["columns"]
);
}

0 comments on commit 2011428

Please sign in to comment.