Re: [SQL] Re: Simple search question

2000-06-20 Thread mikeo
do select setval('seqname',#); At 01:17 PM 6/15/00 -0500, John McKown wrote: > >Alex wrote in message <[EMAIL PROTECTED]>... >>Hi, >> >>> I had the same problem but was using Java, not PHP (I guess that >>> whatever I can do in JDBC, you can do in PHP ;-)). >>> >>> SELECT last_value FROM ; >>

Re: [SQL] Re: Simple search question

2000-06-20 Thread Stephan Szabo
> This brings me back to another unanswered question recently posted up,maybe > it is impossible... > I declared a new table with one of the types as serial (which is really just a > sort of macro I believe, which automates the creation of a few things for your > convenience), which initialises th

[SQL] Re: Simple search question

2000-06-20 Thread John McKown
Alex wrote in message <[EMAIL PROTECTED]>... >Hi, > >> I had the same problem but was using Java, not PHP (I guess that >> whatever I can do in JDBC, you can do in PHP ;-)). >> >> SELECT last_value FROM ; > >This brings me back to another unanswered question recently posted up, maybe >it is impos

[SQL] Re: Simple search question

2000-06-15 Thread Alex
Hi, > I had the same problem but was using Java, not PHP (I guess that > whatever I can do in JDBC, you can do in PHP ;-)). > > SELECT last_value FROM ; This brings me back to another unanswered question recently posted up, maybe it is impossible... I declared a new table with one of the types a

[SQL] Re: Simple search question

2000-06-14 Thread Peter Dixon
Alex <[EMAIL PROTECTED]> writes: > Hi, > after running a script which performs an insert, a new tuple is > created, and a serial number is generated for it. I want to write the > new tuple data back to the screen, including the new serial number. > My question is, do I have to do a search for

[SQL] Re: Simple search question

2000-06-13 Thread John McKown
On Tue, 13 Jun 2000 12:15:17 +1000, Alex <[EMAIL PROTECTED]> wrote: [snip] > >> 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

Re: [SQL] Re: Simple search question

2000-06-12 Thread Michael Fork
Judging by the PHP Manual -- http://www.php.net/manual/function.pg-getlastoid.php -- it appears that the pg_GetLastOid command returns the last OID for the given result, and therefore would be unaffected by other inserted records. >From the manual: int pg_getlastoid (int result_id) -- can be use

[SQL] Re: Simple search question

2000-06-12 Thread Alex
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

[SQL] Re: Simple search question

2000-06-12 Thread John McKown
On Tue, 13 Jun 2000 09:42:01 +1000, Alex <[EMAIL PROTECTED]> wrote: ]>Hi, ]> after running a script which performs an insert, a new tuple is ]>created, and a serial number is generated for it. I want to write the ]>new tuple data back to the screen, including the new serial number. ]> My question