Advertisement
Guest User

Untitled

a guest
Feb 26th, 2016
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. <?php
  2. //$db = pg_pconnect( "host=localhost user=postgres password=123 port=5432 dbname=supershop");
  3. $db = pg_pconnect( "host=localhost user=postgres port=5432 dbname=shop");
  4. if( !$db )
  5. die( 'Something bad happened!' );
  6.  
  7. function checkresult( $result )
  8. {
  9. echo pg_last_error($db);
  10. if ( !$result )
  11. {
  12. echo "Error.\n";
  13. exit;
  14. }
  15. }
  16. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement