Array From DB sQLServer
| From: | Joe Van Meer | Date: | Fri, 16 Nov 2001 17:31:14 +0000 |
| Subject: | Array From DB sQLServer | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-74904@lists.php.net to get a copy of this message | ||
Hi there. I have a table called IMAGES and I would like to retrieve all
image_ids and dump into an array. I'm new to php so any help would greatly
be appreciated. I started my code below, but am unsure what to do next :(
Thx Joe:)
'connect to db
$connectionToDBid = odbc_connect("codesnipits", "joecode", "joecode");
// sql statement
$sqlb = "SELECT image_id FROM IMAGES";
'execute the query and dump into $row variable
$row = odbc_fetch_row($connectionToDBid, $sqlb);
'loop through each record and dump image_ids into array
for each($row as $value){
// assign ids to array here???
}