SHARE
TWEET

Untitled

a guest Jun 25th, 2019 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. [Apache Ignite]
  2. Description=Apache Ignite
  3. DSN=Apache Ignite
  4. Driver=/usr/local/lib/libignite-odbc.so
  5. Setup=/usr/local/lib/libignite-odbc.so
  6. DriverODBCVer=03.00
  7. FileUsage=0
  8. UsageCount=1
  9.      
  10. export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
  11. export LD_LIBRARY_PATH=/usr/local/lib/
  12.      
  13. linux-vdso.so.1 =>  (0x00007ffef07c0000)
  14.  
  15. libignite-binary-2.7.0.33575.so.0 => /usr/local/lib/libignite-binary-2.7.0.33575.so.0 (0x00007fd8b8d4d000)
  16.  
  17. libodbcinst.so.2 => /usr/lib/x86_64-linux-gnu/libodbcinst.so.2 (0x00007fd8b8b3b000)
  18.  
  19. libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fd8b87b9000)
  20.  
  21. libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fd8b83ef000)
  22.  
  23. libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fd8b81d9000)
  24.  
  25. libignite-common-2.7.0.33575.so.0 => /usr/local/lib/libignite-common-2.7.0.33575.so.0 (0x00007fd8b7fc2000)
  26.  
  27. libltdl.so.7 => /usr/lib/x86_64-linux-gnu/libltdl.so.7 (0x00007fd8b7db8000)
  28.  
  29. libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fd8b7b9b000)
  30.  
  31. libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fd8b7892000)
  32.  
  33. /lib64/ld-linux-x86-64.so.2 (0x00007fd8b9227000)
  34.  
  35. libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fd8b768e000)
  36.      
  37. <?php
  38.  
  39. try {
  40.     // Connecting to Ignite using pre-configured DSN.
  41.     $dbh = new PDO('odbc:Driver=Apache Ignite;ADDRESS=127.0.0.1:10800;Cache    =default');
  42.  
  43.     // Changing PDO error mode.
  44.     $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
  45.  
  46.     // Preparing query.
  47.     $dbs = $dbh->prepare('INSERT INTO city (id, name) VALUES (?, ?)');
  48.  
  49.     // Declaring parameters.
  50.     $key = 777;
  51.     $firstName = "James";
  52.  
  53.     // Binding parameters.
  54.     $dbs->bindParam(1, $key);
  55.     $dbs->bindParam(2, $firstName);
  56.  
  57.     // Executing the query.
  58.     $dbs->execute();
  59.  
  60. } catch (PDOException $e) {
  61.     print "Error!: " . $e->getMessage() . "n";
  62.     die();
  63. }
  64.  
  65. ?>
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