I'm try to execute fallowing code:
<?php
ini_set("display_errors", 1);
error_reporting(E_ALL);
try {
$ignite = new PDO('odbc:Apache Ignite');
$ignite->setAttribute(PDO::ATTR_ERRMODE,
PDO::ERRMODE_EXCEPTION);
$sql = 'CREATE TABLE IF NOT EXISTS test_md5 (id int PRIMARY
KEY, userkey
LONGVARCHAR, server LONGVARCHAR, tsession LONGVARCHAR, tpost LONGVARCHAR,
tget LONGVARCHAR, adddate int) WITH
"atomicity=transactional,cachegroup=somegroup"';
$ignite->exec($sql);
for($i=0; $i <= 10; $i++){
$dbs = $ignite->prepare("INSERT INTO test_md5 (id,
userkey, server,
tsession, tpost, tget, adddate) VALUES ($i, 'Lorem ipsum dolor sit amet,
consectetur adipiscing elit, sed do elit, sed', 'b', 'c', 'd', 'e', 1)");
$dbs->execute();
}
} catch (PDOException $e) {
print "Error!: " . $e->getMessage() . "\n";
die();
}
?>
String length is 73 characters...
After when I try to read data from Ignite by similar code:
$stmt = $ignite->prepare("select * from test_md5");
$endTime = microtime(true);
$stmt->execute();
$rows = $stmt->fetchAll();
foreach($rows as $item){
echo var_dump($item);
die();
}
I have fallowing results:
array(14) { ["ID"]=> string(1) "0" [0]=> string(1) "0" ["USERKEY"]=> NULL
[1]=> NULL ["SERVER"]=> string(1) "b" [2]=> string(1) "b" ["TSESSION"]=>
string(1) "c" [3]=> string(1) "c" ["TPOST"]=> string(1) "d" [4]=> string(1)
"d" ["TGET"]=> string(1) "e" [5]=> string(1) "e" ["ADDDATE"]=> string(1) "1"
[6]=> string(1) "1" }
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/