hello forum!
i want to execute this query
but fail
would be the right way to do?
i want to execute this query
$query = 'INSERT INTO Pedidos (OrdenCompra, Cliente, Fecha, Anulado)
VALUES (' . (int)$id . ', ' . Yii::app()->user->id . ', NOW(), 0)';
$query = Yii::app()->db->createCommand($query)->execute();but fail
would be the right way to do?