mirror of
https://github.com/vrana/adminer.git
synced 2025-08-09 08:06:59 +02:00
Allow specifying column in get_vals
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@608 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
@@ -28,13 +28,13 @@ function optionlist($options, $selected = null) {
|
||||
return $return;
|
||||
}
|
||||
|
||||
function get_vals($query) {
|
||||
function get_vals($query, $column = 0) {
|
||||
global $dbh;
|
||||
$return = array();
|
||||
$result = $dbh->query($query);
|
||||
if ($result) {
|
||||
while ($row = $result->fetch_row()) {
|
||||
$return[] = $row[0];
|
||||
$return[] = $row[$column];
|
||||
}
|
||||
$result->free();
|
||||
}
|
||||
|
Reference in New Issue
Block a user