I want use but not work please help me.
$sql = Yii::$app->db("INSERT INTO posts(name) VALUES(:name)");
$sql->bindValues([':name' => 'John']);
$sql->execute();
try create command exceute
Yii::$app->db->createCommand('INSERT INTO posts(name) VALUES(:name)')
->bindValues([':name' => 'John'])->execute();