Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

Trouble With Createcommand And Now()

$
0
0
hello forum!
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?

Viewing all articles
Browse latest Browse all 18717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>