Re: Re: Concern over ext/pgsql API
| From: | Christopher Kings-Lynne | Date: | Fri, 01 Apr 2005 02:04:13 +0000 |
| Subject: | Re: Re: Concern over ext/pgsql API | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-15709@lists.php.net to get a copy of this message | ||
Those functions are basically useless - they just return a string. Everyone's PHP/Pgsql apps at the moment have to to regexes on those strings to figure out what the error was. ChrisHOWEVER, it is not possible to get a result resource from a failed pg_query! pg_query() returns FALSE on failure, not a result.You could call pg_last_error(), or pg_last_notice(). Although the last one is currently somehow broken: http://bugs.php.net/bug.php?id=32223