You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.
require__DIR__ . '/vendor/autoload.php';
useInfluxDB\Database;
useInfluxDB\Point;
$client = newInfluxDB\Client('127.0.0.1');
$database = $client->selectDB('stat');
$points = array(
newPoint(
'test_metric', // name of the measurement0.64, // the measurement value
['host' => 'server01', 'region' => 'us-west'], // optional tags
['cpucount' => 10], // optional additional fields1435255849 // Time precision has to be set to seconds!
),
newPoint(
'test_metric', // name of the measurement0.84, // the measurement value
['host' => 'server02', 'region' => 'us-west'], // optional tags
['cpucount' => 10], // optional additional fields1435255849 // Time precision has to be set to seconds!
)
);
// we are writing unix timestamps, which have a second precision$result = $database->writePoints($points, Database::PRECISION_SECONDS);
$result = $database->query(
// 'select * from test_metric where host = $host LIMIT 5','select * from test_metric where "host" = $host LIMIT 5',
[
'params' => json_encode([
'host' => 'server02'
]),
],
)->getPoints();
dd($result);
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
InfluxDB supports binding parameters. This feature covers issue #53
The text was updated successfully, but these errors were encountered: