InfluxPHP icon indicating copy to clipboard operation
InfluxPHP copied to clipboard

Add quotes in CREATE DATABASE

Open dtouzeau opened this issue 9 years ago • 0 comments

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); }

dtouzeau avatar May 07 '15 08:05 dtouzeau