Mass delete

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@362 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana
2008-01-08 14:02:55 +00:00
parent 0648706f07
commit 116faf2e2c
5 changed files with 98 additions and 36 deletions

View File

@@ -137,13 +137,16 @@ function unique_idf($row, $indexes) {
return $return;
}
function where() {
function where($where = null) {
global $mysql;
if (!isset($where)) {
$where = $_GET;
}
$return = array();
foreach ((array) $_GET["where"] as $key => $val) {
foreach ((array) $where["where"] as $key => $val) {
$return[] = idf_escape(bracket_escape($key, "back")) . " = BINARY '" . $mysql->escape_string($val) . "'"; //! enum and set
}
foreach ((array) $_GET["null"] as $key) {
foreach ((array) $where["null"] as $key) {
$return[] = idf_escape(bracket_escape($key, "back")) . " IS NULL";
}
return $return;