InfluxPHP
InfluxPHP copied to clipboard
Add quotes in CREATE DATABASE
If you need to create database with "-" the influx return error
Example: 64da52bf-3388-9168-da9a-00000c7184d9
{"error":"error parsing query: found 64da52bf-3388-9168-da9a-00000c7184d9, expected identifier at line 1, char 16"}* Closing connection #0
This will fix issue. public function createDatabase($name) { $this->get('query', array('q' => "CREATE DATABASE "$name"")); return new DB($this, $name); }