Re: [INTERFACES] web interface php3 question.
От | Adam Lang |
---|---|
Тема | Re: [INTERFACES] web interface php3 question. |
Дата | |
Msg-id | 015801c042a9$51d51840$330a0a0a@6014cwpza006 обсуждение исходный текст |
Список | pgsql-php |
for ($i = 0; $i < pg_numrows($result); $i++) { $row_array=pg_fetch_row($result, $i); } This works... it should also if you plug in array as opposed to row. I tried your code also with fetch_row and it bombed out (I changed company to 0). Adam Lang Systems Engineer Rutgers Casualty Insurance Company ----- Original Message ----- From: "Rich.Martin" <Rich.Martin@wcom.com> To: "Adam Lang" <aalang@rutgersinsurance.com> Sent: Monday, October 30, 2000 2:04 PM Subject: RE: [INTERFACES] web interface php3 question. > Yes, that what's got me confused. I've tried it with several variables, but > 0, 1, and 7 all get errors (described below). If I don't include any > variable I get the error message. > > I also have a book, PHP Essentials, which uses an example call to a > PostgreSQL database and they don't use two variable, but I get an error with > the same exact call. > > Could it be the size of database I'm calling? It has 7 columns but about a > hundred rows. Do you know if there is a maximum size for a db? > Rich > > > > > -----Original Message----- > From: Adam Lang [mailto:aalang@rutgersinsurance.com] > Sent: Monday, October 30, 2000 11:42 AM > To: Rich.Martin; pgsql-interfaces@hub.org > Subject: Re: [INTERFACES] web interface php3 question. > > > It should work with version 3. Are there 7 rows of data in the table? It > might not let you call it if the row doesn't exist. > > http://php.net/manual/function.pg-fetch-array.php > > Adam Lang > Systems Engineer > Rutgers Casualty Insurance Company > ----- Original Message ----- > From: "Rich.Martin" <Rich.Martin@wcom.com> > To: <pgsql-interfaces@hub.org> > Sent: Monday, October 30, 2000 1:19 PM > Subject: [INTERFACES] web interface php3 question. > > > > Hello, > > I'm trying to setup a web page that calls a PostgreSQL database. I'm > > connecting to the database ok. Does anyone know if php3 support > > pg_fetch_array? I keep getting an error that says: > > > > Warning: Wrong parameter count for pg_fetch_array() in > > /home/contacts/whole.phtml on line 72 > > > > I'm calling it in the code like this: > > > > while ($r = pg_fetch_array($result)) {$company = $r["company']; > > > > if I add a another variable like this: > > > > while ($r = pg_fetch_array($result, 7)) {$company = $r["company']; > > > > the resulting page takes forever to load and repeats the first entry to > the > > database. I know that the server I'm using has php3 on it. Is that the > > problem? > > > > If you have a solution please let me know. > > Thanks, > > Rich
В списке pgsql-php по дате отправления: