title: getting an array instead of string from a query yii2
body: <p>the task is to save the $model->image with row id in it.
  to anticipate the next autoincrement id i use the query below. mysql returns right result, but when i try to save this query result in model it saves it like 'Array' string.
  For example : article_Array_1516534305.png instead of article_13_1516534305.png</p>
  
  <p>i tried to use array_shift() function, but result is the same</p>
  
  <pre><code>        $connection = Yii::$app-&gt;getDb();
          $dbName = $this-&gt;getDsnAttribute('dbname', Yii::$app-&gt;getDb()-&gt;dsn);
  
          $query = new Query;
          $query-&gt;select('AUTO_INCREMENT')
              -&gt;from('information_schema.TABLES')
              -&gt;where("TABLE_SCHEMA = '".$dbName."'")
              -&gt;andWhere("TABLE_NAME = '".$this-&gt;tableName()."'");
          $id = $query-&gt;one();
  
          $this-&gt;image = 'article_'.$id.'_'.time(). '.' . $image-&gt;extension;  
  </code></pre>