Re: Newbie Question - PHP and MSACCESS
| From: | Fredrik de Vibe | Date: | Sun, 16 Feb 2003 21:50:14 +0000 |
| Subject: | Re: Newbie Question - PHP and MSACCESS | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-25676@lists.php.net to get a copy of this message | ||
jcocchin@comcast.net (J.M. Cocchini) writes:
> $result = odbc_do($connection,"select * from events where id=$id");
> odbc_fetch_row($result);
>
> Am not understanding how to "print()" the fields in the rows, one after
> the next, on the same line, and then do the same with the next record,
> until all records have been presented.
From the manual: "After odbc_fetch_row() is called, the fields of that
row can be accessed with odbc_result()."
(http://www.php.net/manual/en/function.odbc-fetch-row.php)
It returns true on success, so test for this as well.
odbc_result() is described on
http://www.php.net/manual/en/function.odbc-result.php
then you might find the c-like printf() a nice function to output the
strings, but that is subject to preference ;-)
--
--Fredrik
"Why be a man when you can be a success?"
-- Bertold Brecht