Re: Simple search question

From: Alex <gliathit(at)ihug(dot)com(dot)au>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Simple search question
Date: 2000-06-13 02:15:17
Message-ID: 39459935.CCCEFDAA@ihug.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Michael Fork 2000-06-13 02:30:33 Re: Re: Simple search question
Previous Message John McKown 2000-06-13 01:09:11 Re: Simple search question