From 0bd864ea6f2df4df24e4ee207cf592fb21bc88eb Mon Sep 17 00:00:00 2001 From: jakubvrana Date: Thu, 21 May 2009 11:05:22 +0000 Subject: [PATCH] Allow specifying column in get_vals git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@608 7c3ca157-0c34-0410-bff1-cbf682f78f5c --- functions.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions.inc.php b/functions.inc.php index ebe761df..43de2819 100644 --- a/functions.inc.php +++ b/functions.inc.php @@ -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(); }