Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 59769476AE7 for ; Fri, 6 Dec 2002 13:47:12 -0500 (EST) Received: from themode.com (themode.com [161.58.169.198]) by postgresql.org (Postfix) with ESMTP id 799DC476B25 for ; Fri, 6 Dec 2002 13:46:04 -0500 (EST) Received: from localhost (mode@localhost) by themode.com (8.11.6) id gB6Ik4f85923; Fri, 6 Dec 2002 13:46:04 -0500 (EST) Date: Fri, 6 Dec 2002 13:46:04 -0500 (EST) From: brew@theMode.com X-X-Sender: mode@themode.com To: PGSQL-PHP@postgresql.org Cc: Mark Nelson Subject: Re: getting integer result from 4.1 In-Reply-To: <01KPPJMDTOPE90PUDH@cc.usu.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200212/8 X-Sequence-Number: 1683 Mark..... > $update = //this is where I execute the query > $updates = pg_fetch_row($update, 0); > echo "rows updated=".$updates[0]."
"; > > But that blows up with > Warning: Unable to jump to row 0 on PostgreSQL result index 6 in > my php doc. ....probably because there is nothing returned from your query (there is no row zero, or any other row). Check into the PHP PostgreSQL funtion pg_numrows docs at php.net (or pg_num_rows, the name has recently changed depending on which version PHP you are using). I usually query, then check the number of rows and loop through them only if something is returned, else I print out a 'Nothing Found' type of message. brew