note 83803 added to function.odbc-fetch-row

From: Date: Thu, 12 Jun 2008 15:12:33 +0000
Subject: note 83803 added to function.odbc-fetch-row
Groups: php.notes 
Request: Send a blank email to php-notes+get-140378@lists.php.net to get a copy of this message
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. 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; } ---- Server IP: 89.248.170.61 Probable Submitter: 213.201.145.218 ---- Manual Page -- http://www.php.net/manual/en/function.odbc-fetch-row.php Edit -- https://master.php.net/note/edit/83803 Del: integrated -- https://master.php.net/note/delete/83803/integrated Del: useless -- https://master.php.net/note/delete/83803/useless Del: bad code -- https://master.php.net/note/delete/83803/bad+code Del: spam -- https://master.php.net/note/delete/83803/spam Del: non-english -- https://master.php.net/note/delete/83803/non-english Del: in docs -- https://master.php.net/note/delete/83803/in+docs Del: other reasons-- https://master.php.net/note/delete/83803 Reject -- https://master.php.net/note/reject/83803 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#140378) next »