Alex wrote: > > Hi, > I need to do an extremely simple thing, but I have not found any docs on > this. All I want to do is print out the oid of the row I just SELECTed out > of postgreSQL, using php. > I am aware of the pg_GetLastOid function, but that will only return the oid > of the row that was last INSERTed, and won't work on any other statements. I > also want to avoid adding an oid type column in the table. > Doing this under libpq is trivial, a 'SELECT oid from table' will do the > job. The php postgreSQL module was most probably compiled using libpq, so > this should be possible right? > ThYou have to select the oid at some point. Either using a seperate "SELECT oid FROM >table" as you say or include it in your query "SELECT oid, id, field1 FROM table". >AFAIK there is no way to just grab it arbitrarily. Otherwise either the oid would >have to be invisibly returned with every row from a query which would have to be >written into PHP and then you run into trouble with joins and so on. This is the same functionality with mSQL where an internal variable called '_row' could be used but was never returned from a query unless you specifically asked it for it in a query - not even SELECT * would show it. Cheers, Graeme -- SLUG - Sydney Linux Users Group Mailing List - http://www.slug.org.au To unsubscribe send email to [EMAIL PROTECTED] with unsubscribe in the text
