From: Alex <gliathit@ihug.com.au>
To: pgsql-sql@postgresql.org
Subject: Re: Simple search question
Date: Tue, 13 Jun 2000 12:15:17 +1000
Message-ID: <39459935.CCCEFDAA@ihug.com.au> (raw)
References: <39457549.CEA07C63@ihug.com.au>
<slrn8kb2dm.3rr.newsuser@linux2.johnmckown.net>
Hi,
> What language is your "script" written in? Based on some previous posts,
> I guess you're talking about a PHP script. How did you add the tuple?
> I'd guess with a pg_Exec(connect_id,"INSERT ...."). From reading the doc,
> I think that you can get the row just inserted by using the pg_fetch_row()
> function, passing it the result from the pg_Exec and asking for row 0.
OK, I just tried pg_fetch_array() and the above didn't work.
> I have not yet gotten anything running with PHP (lack of time to "play"),
For someone who hasn't had time to play, you certainly know alot about php :)
If you need any examples, I'd be willing to post them, time permitting.
I thought libpq was easy to use, this is very straightforward. I have been
'playing' with it for a few days, and it is my development tool of choice
now. Of course, this is because of faster development time, don't expect
Yahoo! to replace their cgi with PHP just yet.
> so I can't test this. If it doesn't work, I'd try using pg_GetLastOid()
> to get the OID of the inserted row. The use the pg_Exec and SELECT
> * WHERE OID=oid-value, followed by pg_fetch_row().
Thanks John, and the other person that replied to my email (I know it is a
bit of a stupid question, but in such an unpopulated list, I don't think
there's any reason to post privately).
This leads to another question. If someone adds another row during this,
what will happen?
Thanks,
Alex
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-sql@postgresql.org
Cc: gliathit@ihug.com.au
Subject: Re: Simple search question
In-Reply-To: <39459935.CCCEFDAA@ihug.com.au>
References: <39457549.CEA07C63@ihug.com.au> <slrn8kb2dm.3rr.newsuser@linux2.johnmckown.net> <39459935.CCCEFDAA@ihug.com.au>
* 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