SHARE
TWEET

Untitled

a guest Jun 5th, 2017 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. $dsn = 'pgsql:dbname=venom;host=localhost';
  4. $user = 'cojack';
  5. $password = 'xxxxx';
  6.  
  7. try {
  8.     $dbh = new PDO($dsn, $user, $password);
  9. } catch (PDOException $e) {
  10.     echo 'Connection failed: ' . $e->getMessage();
  11. }
  12.  
  13. $pierwszy = 1;
  14. $drugi = 'tereferer';
  15. $trzeci = NULL;
  16.  
  17. $sth = $dbh->prepare( 'SELECT "testowafunkja" ( :pierwszyArgument, :drugiArgument );' );
  18. $sth->bindParam(':pierwszyArgument', $pierwszy, PDO::PARAM_INT);
  19. $sth->bindParam(':drugiArgument', $drugi, PDO::PARAM_STR|PDO::PARAM_INPUT_OUTPUT, 12);
  20. $sth->execute();
  21.  
  22. var_dump($sth);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top