note 83803 deleted from function.odbc-fetch-row by googleguy

From: Date: Tue, 22 Oct 2013 11:01:15 +0000
Subject: note 83803 deleted from function.odbc-fetch-row by googleguy
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-197022@lists.php.net to get a copy of this message
Note Submitter: GiladD ---- Here's my silly companion to odbc_fetch_row, odbc_fetch_column! It takes a SQL table and the Column's name to look for, and returns an array with all the items in that column. It can be easily changes to take the column's number instead of name, but I prefer it this way. <?php function odbc_fetch_column($my_rs,$col_name) { $tmpArray = array(); while (odbc_fetch_row($my_rs)) {array_push($tmpArray,odbc_result($my_rs,$col_name));} return $tmpArray; } ?>

« previous php.notes (#197022) next »