Re: Simple search question - Mailing list pgsql-sql

From Alex
Subject Re: Simple search question
Date
Msg-id 39459935.CCCEFDAA@ihug.com.au
Whole thread Raw
In response to Simple search question  (Alex <gliathit@ihug.com.au>)
Responses Re: Re: Simple search question
List pgsql-sql
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



pgsql-sql by date:

Previous
From: newsuser@linux2.johnmckown.net (John McKown)
Date:
Subject: Re: Simple search question
Next
From: Michael Fork
Date:
Subject: Re: Re: Simple search question