Created
October 5, 2015 14:14
-
-
Save pgmccann/1509fc03b6bf858021dd to your computer and use it in GitHub Desktop.
Execute Postgres Query
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Thanks to Swithun Crowe | |
function do_query($query, $params=array()) { | |
$result = pg_query_params($query, $params) or die('Query failed: ' . pg_last_error()); | |
return $result; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment