From: brew@theMode.com
To: PGSQL-PHP@postgresql.org
Cc: Mark Nelson <MCN@cc.usu.edu>
Subject: Re: getting integer result from 4.1
Date: Fri, 6 Dec 2002 13:46:04 -0500 (EST)
Message-ID: <Pine.BSF.4.44.0212061337450.84038-100000@themode.com> (raw)
In-Reply-To: <01KPPJMDTOPE90PUDH@cc.usu.edu>
Mark.....
> $update = //this is where I execute the query
> $updates = pg_fetch_row($update, 0);
> echo "rows updated=".$updates[0]."<br>";
>
> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: brew@theMode.com, MCN@cc.usu.edu
Subject: Re: getting integer result from 4.1
In-Reply-To: <Pine.BSF.4.44.0212061337450.84038-100000@themode.com>
References: <01KPPJMDTOPE90PUDH@cc.usu.edu> <Pine.BSF.4.44.0212061337450.84038-100000@themode.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox