I have tried this:
return self::find()->select('id')->where(['like', 'id', $id."%", false])->asArray()->all();
This gives me error: Array to string conversion
With this:
return self::find()->select('id')->andFilterWhere(['like', 'id', $id])->asArray()->all();
I get % around both sides of the string, and I do not want that.
I red this: http://www.yiiframework.com/doc-2.0/guide-db-query-builder.html#operator-format
But I do not understand what to do… It seems complicated, or I need to read some other guide ?
Can someone help me please ? I need to make this: LIKE "1%"