PDO and PostgreSQL - RAISE NOTICE
| From: | Samuel ROZE | Date: | Sun, 04 Oct 2009 15:06:40 +0000 |
| Subject: | PDO and PostgreSQL - RAISE NOTICE | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-46554@lists.php.net to get a copy of this message | ||
Hi !
I'm new on this mailling list, so i don't realy know if you know the
response and if it is realy here that I have to ask my question :-)
I'm working with PostgreSQL (8.3 form sources) and PDO (PHP 5.2.10 from
sources). In a Postgres function, I have a "RAISE NOTICE" command. My
function works like that in console:
=> SELECT * FROM public.test_info();
NOTICE: An information...
test_info
------------
ok
(1 line)
There's a NOTICE, like I want ! :-) But, when i'm using PDO, I don't
know how I can get this NOTICE, which will provide me some informations
about the usage of the function.
Code:
----------------------------------------------
<?
$sql = new PDO('...');
$stat = $sql->query('SELECT * FROM public.test_info()');
var_dump($stat);
?>
----------------------------------------------
Output:
----------------------------------------------
object(PDOStatement)#4 (1) {
["queryString"]=>
string(34) "SELECT * FROM public.test_info()"
}
----------------------------------------------
Is there someone who know how I can get that ? I read some thinks about
that and pg_last_notice may returns the NOTICE, but with PDO ?
Thanks !
Samuel (French).