require "vendor/autoload.php";
use PhpOrient\PhpOrient;
$client = new PhpOrient( 'localhost', 2424 );
$ClusterMap = $client->dbOpen( 'joshua4', 'admin', 'admin' );
$some_object=array(
"stange_text"=>"some \ text"
);
$strange_text=json_encode($some_object);
echo "Original text: ".$some_object['stange_text'].PHP_EOL;
echo "OBJ json encoded: ".$strange_text.PHP_EOL;
$ret=$client->command($sql="update person set test = $strange_text where name = 'bob'");
echo "SQL command: ".$sql.PHP_EOL;
echo "Command return:".PHP_EOL;
var_dump($ret);
$ret=$client->query( 'select test from person where name = "bob"' );
$vertex=$ret[0]->getOData();
$res=($i['test']['stange_text']===$some_object['stange_text']);
echo "Match texts result:".PHP_EOL;
var_dump($res);
echo "Returned record:".PHP_EOL;
var_dump($vertex);Original text: some \ text
OBJ json encoded: {"stange_text":"some \\ text"}
SQL command: update person set test = {"stange_text":"some \\ text"} where name = 'bob'
Command return:
string(1) "1"
Match texts result:
bool(false)
Returned record:
array(1) {
'test' =>
array(1) {
'stange_text' =>
string(12) "some \\ text"
}
}
Thank you. I'll give it a try as soon as possible and I let you know
--
---
You received this message because you are subscribed to a topic in the Google Groups "OrientDB" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/orient-database/EyD6aEW1c_o/unsubscribe.
To unsubscribe from this group and all its topics, send an email to orient-databa...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.