note 7749 deleted from function.pg-exec by nlopess
| From: | nlopess@php.net | Date: | Sat, 26 Jun 2004 19:18:47 +0000 |
| Subject: | note 7749 deleted from function.pg-exec by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-71824@lists.php.net to get a copy of this message | ||
Note Submitter: jeff@pgsql.com
----
few note/tips for everyone out there
1: that getlast oid or whatever it's called. that's slow and painful.. try this.
if your table (ie "users" has a serial type (ie "uid") and you want to find out
the most recent one. do this select
SELECT currval('id_users_seq');
2nd tip to see if a INSERT/UPDATE worked
or not and how to suppress it's error message
1: $insert=@pg_exec($dbh,$insertstring)
if ($insert == 0 ) { /* it screwed up */ }
2: the @ infron of pg_exec suppresses the errors.
jeff@pgsql.com