pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Chris <dmagick@gmail.com>
To: Mag Gam <magawake@gmail.com>
Cc: Randy Moller <zoomerz@comcast.net>
Cc: pgsql-php@postgresql.org
Subject: Re: HTML FORMS selected question
Date: Mon, 04 Dec 2006 11:25:59 +1100
Message-ID: <45736B17.3020909@gmail.com> (raw)
In-Reply-To: <1cbd6f830612031600xb902e5fgf3eb485a8af59a@mail.gmail.com>
References: <457358D9.4000404@gmail.com>
	<20061203232352.A93629F9F8D@postgresql.org>
	<1cbd6f830612031543w26cdb6e2s82f1b958009d1b7@mail.gmail.com>
	<45736235.6080302@gmail.com>
	<1cbd6f830612031600xb902e5fgf3eb485a8af59a@mail.gmail.com>

Mag Gam wrote:
> Chris + Randy:
> 
> Sorry, I may of forgetten to give you this:
> $result = pg_query($dbconn, "select id,address from ip");
> 
> This is right before the:
> $options=pg_fetch_array($result_ip);
> 
> so, my $results is really all the ip addresses ($rows after I perform 
> the pg_fetch_array).
> 
> I will add the var_dump to see it (never done it before, I will do some 
> googling :) )

After your query add it:

$result = pg_query(....)
var_dump($result);

if that's not a "resource" then you have a problem with your query. Use 
pg_last_error to work it out.


Inside your loop, add it:

while ($row = pg_fetch_array($result)) {
   var_dump($row);
}

-- 
Postgresql & php tutorials
http://www.designmagick.com/



view thread (10+ messages)  latest in thread

Message-ID: <45736B17.3020909@gmail.com>
Permalink:  ../45736B17.3020909@gmail.com/
Also on:    postgresql.org/message-id/45736B17.3020909@gmail.com

 · 

reply

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: dmagick@gmail.com, magawake@gmail.com, zoomerz@comcast.net
  Subject: Re: HTML FORMS selected question
  In-Reply-To: <45736B17.3020909@gmail.com>
  References: <457358D9.4000404@gmail.com> <20061203232352.A93629F9F8D@postgresql.org> <1cbd6f830612031543w26cdb6e2s82f1b958009d1b7@mail.gmail.com> <45736235.6080302@gmail.com> <1cbd6f830612031600xb902e5fgf3eb485a8af59a@mail.gmail.com> <45736B17.3020909@gmail.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