From: jakubvrana Date: Thu, 21 May 2009 11:05:22 +0000 (+0000) Subject: Allow specifying column in get_vals X-Git-Tag: v3.0.0~914 X-Git-Url: https://git.joonet.de/?a=commitdiff_plain;h=0bd864ea6f2df4df24e4ee207cf592fb21bc88eb;p=adminer.git Allow specifying column in get_vals git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@608 7c3ca157-0c34-0410-bff1-cbf682f78f5c --- 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(); }