Re: Array From DB sQLServer
| From: | Joe Van Meer | Date: | Fri, 16 Nov 2001 18:46:23 +0000 |
| Subject: | Re: Array From DB sQLServer | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-74916@lists.php.net to get a copy of this message | ||
got it :) thx for looking
"Joe Van Meer" <joe@coastaldestination.com> wrote in message
news:20011116172944.9056.qmail@pb1.pair.com...
> 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???
>
>
> }
>
>
>
>
>
>