1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-20 21:31:44 +02:00

SimpleDB: Allow selecting arrays

This commit is contained in:
Jakub Vrana
2013-08-06 14:55:56 -07:00
parent 076a0a2634
commit 9ffca2f6e6
5 changed files with 95 additions and 65 deletions

View File

@@ -1,12 +1,4 @@
<?php
/* //!
invalid user or password
report API calls instead of queries
multi-value attributes
select: clone
update: delete + insert when changing itemName()
*/
$drivers["simpledb"] = "SimpleDB";
if (isset($_GET["simpledb"])) {
@@ -72,7 +64,13 @@ if (isset($_GET["simpledb"])) {
}
foreach ($item->Attribute as $attribute) {
$name = $this->_processValue($attribute->Name);
$row[$name] .= ($row[$name] != '' ? ',' : '') . $this->_processValue($attribute->Value);
$value = $this->_processValue($attribute->Value);
if (isset($row[$name])) {
$row[$name] = (array) $row[$name];
$row[$name][] = $value;
} else {
$row[$name] = $value;
}
}
$this->_rows[] = $row;
foreach ($row as $key => $val) {