Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Yii How to display the rendered query before it's executed
- $sql="SELECT * from users WHERE user_id = :user_id";
- $command=Yii::app()->db->createCommand($sql);
- // replace the placeholder ":user_id" with the actual username value
- $command->bindParam(":user_id",$user_id,PDO::PARAM_INT);
- echo "<br/>".$command->getText();
- SELECT * from users WHERE user_id = 1
- SET GLOBAL general_log = 'ON';
- SELECT * FROM mysql.general_log;
- SET GLOBAL general_log = 'OFF';
Add Comment
Please, Sign In to add comment