session_start(); $access = $this->token(); $token_type = $access->token_type; $token = $access->access_token; date_default_timezone_set('UTC'); $date = date('D , d M Y H:i:s'); //Sun, 20 Sep 2009 20:36:40 GMT $tablename = 'info'; $columns[] = array( 'name'=>'Number', 'dataType'=>'Int64', ); $columns[] = array( 'name'=>'ClinetId', 'dataType'=>'Int64', ); $columns[] = array( 'name'=>'Price', 'dataType'=>'Int64', ); $columns[] = array( 'name'=>'MenuId', 'dataType'=>'string', ); $columns[] = array( 'name'=>'PurchaseTime', 'dataType'=>'DateTime', ); $table = array( 'name'=>$tablename, 'columns'=> $columns, ); $data = array( 'name'=>'Client', 'tables'=>array($table), ); $url ="https://api.PowerBI.com/v1.0/myorg/datasets"; $header[] ="Authorization:$token_type $token"; $header[] ="Content-Type: application/json"; $header[]= "content_length:0"; $data1 = utf8_encode(json_encode($data)); $res = $this->get_respond('creat',$data1,$header,$url); return $res;
I find error my cloumn setting woring