note 109548 added to function.pg-last-oid

From: Date: Fri, 27 Jul 2012 14:02:59 +0000
Subject: note 109548 added to function.pg-last-oid
Groups: php.notes 
Request: Send a blank email to php-notes+get-189427@lists.php.net to get a copy of this message
Simply getting LAST_INSERT_ID; <?php // Note: waiting for "select" part from pg_query below. // Note: separating the query parts using semicolons (;). $qry = pg_query(" INSERT INTO users (id,uname,upass,rep) VALUES (DEFAULT,'bubu','a981v',0.19); SELECT Currval('users_id_seq') LIMIT 1 "); $fch = pg_fetch_row($qry); print_r($fch); ?> Array ( [0] => 3 -> Gotcha! ) ---- Server IP: 160.75.100.7 Probable Submitter: 85.101.222.218 ---- Manual Page -- http://www.php.net/manual/en/function.pg-last-oid.php Edit -- https://master.php.net/note/edit/109548 Del: integrated -- https://master.php.net/note/delete/109548/integrated Del: useless -- https://master.php.net/note/delete/109548/useless Del: bad code -- https://master.php.net/note/delete/109548/bad+code Del: spam -- https://master.php.net/note/delete/109548/spam Del: non-english -- https://master.php.net/note/delete/109548/non-english Del: in docs -- https://master.php.net/note/delete/109548/in+docs Del: other reasons-- https://master.php.net/note/delete/109548 Reject -- https://master.php.net/note/reject/109548 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#189427) next »