chdb::get

(PECL chdb >= 0.1.0)
Gets the value associated with a key
public string chdb::get ( string $key )

Gets the value associated with a key from a chdb database.

Parameters:
key

The key for which to get the value.

Returns:

Returns a string containing the value associated with the given key, or NULL if not found.

Examples:
chdb::get() example
<?php

$data = array(
    'key1' => 'value1',
    'key2' => 'value2',
    // ...
);
chdb_create('data.chdb', $data);

$chdb = new chdb('data.chdb');
$value1 = $chdb->get('key1');
$value2 = $chdb->get('key2');

echo $value1, PHP_EOL;
echo $value2, PHP_EOL;

?>

The above example will output something similar to:

value1
value2
doc_php
2016-02-24 16:08:01
Comments
Leave a Comment

Please login to continue.