Received: from bush.rutgersinsurance.com (rutgersinsurance.com [38.138.71.194]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id e9UJcOC91165 for ; Mon, 30 Oct 2000 14:38:24 -0500 (EST) (envelope-from aalang@rutgersinsurance.com) Received: from 6014cwpza006 ([10.10.10.51]) by bush.rutgersinsurance.com (8.9.3/8.9.3) with SMTP id OAA00772; Mon, 30 Oct 2000 14:43:42 -0500 Message-ID: <015801c042a9$51d51840$330a0a0a@6014cwpza006> From: "Adam Lang" To: "Rich.Martin" Cc: References: Subject: Re: [INTERFACES] web interface php3 question. Date: Mon, 30 Oct 2000 14:40:55 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Archive-Number: 200010/8 X-Sequence-Number: 8 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" To: "Adam Lang" 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" > To: > 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