略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: chdb::get

2024-05-02

chdb::get

(PECL chdb >= 0.1.0)

chdb::getGets the value associated with a key

说明

public chdb::get ( string $key ) : string

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

参数

key

The key for which to get the value.

返回值

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

范例

Example #1 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 
$value1PHP_EOL;
echo 
$value2PHP_EOL;

?>

以上例程的输出类似于:

value1
value2
add a note add a note

User Contributed Notes

There are no user contributed notes for this page.

官方地址:https://www.php.net/manual/en/chdb.get.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3