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:
jakubvrana 2009-05-21 11:05:22 +00:00
parent d204a6ea15
commit 0bd864ea6f

View file

@ -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();
}