[eluser]tlloyduk[/eluser]
Hi All,
I hope you can help me
I am using the Postgres driver and want to call pg_query and pg_fetch_all directly, so I found the call_function() function which does what I need perfectly.
My code:
Code:
$db_id = $this->db->conn_id;
$query = $this->db->call_function('query', $db_id, "SELECT * FROM " . $table);
$result = $this->db->call_function("fetch_all", $query);
My question:
How do I trap an error that is returned by pg_query or pg_fetch_all within the call_function() wrapper? For example if $table contains a reference to an invalid table, a PHP Warning message is displayed in the browser. I want to be able to trap that in advance and handle it myself.
Any ideas?
Thanks,
Tim