Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use IS NULL operator for null value in where_link function

  • Loading branch information...
commit 806264851e3a3d652f3dcb7db3a8df10ed722ce1 1 parent bb4da63
@vrana authored
Showing with 2 additions and 2 deletions.
  1. +1 −1  adminer/include/functions.inc.php
  2. +1 −1  adminer/select.inc.php
View
2  adminer/include/functions.inc.php
@@ -302,7 +302,7 @@ function where_check($val) {
* @return string
*/
function where_link($i, $column, $value, $operator = "=") {
- return "&where%5B$i%5D%5Bcol%5D=" . urlencode($column) . "&where%5B$i%5D%5Bop%5D=" . urlencode($operator) . "&where%5B$i%5D%5Bval%5D=" . urlencode($value);
+ return "&where%5B$i%5D%5Bcol%5D=" . urlencode($column) . "&where%5B$i%5D%5Bop%5D=" . urlencode((isset($value) ? $operator : "IS NULL")) . "&where%5B$i%5D%5Bval%5D=" . urlencode($value);
}
/** Set cookie valid for 1 month
View
2  adminer/select.inc.php
@@ -336,7 +336,7 @@
}
}
foreach ($unique_array as $k => $v) {
- $link .= h(where_link($i++, $k, $v, (isset($v) ? "=" : "IS NULL")));
+ $link .= h(where_link($i++, $k, $v));
}
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.