public function actionDelet()
 {
     $some = new Compose();
     $row = Compose::model()->findall();
     foreach ($row as $value) {
         //$clas::model()->deleteAll("name"===$_POST['Dismis']['name']);
         Yii::app()->db->createCommand("delete from `mywebsite`.`" . strtolower('compose') . "` where `" . strtolower('compose') . "`.`email`='" . $value->email . "'")->query();
         $this->render('mails');
         exit;
     }
 }
Exemple #2
0
		<thead>
			
			<th>Email</th>
			<th>Subject</th>
			<th>Body</th>
			<th>Date</th>
		
		</thead>
	
	<div class ="text-center">
		hello you are in the your Mails
	</div>
	<div class="text-center">	



	<?php 
$model = new Compose();
$row = Compose::model()->findAll();
foreach ($row as $value) {
    echo "\n\t\t\n\t\t\t\n\n\t\t\t\t<tbody>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t<td>{$value->email}</td>\n\t\t\t\t\t\t<td>{$value->subject}</td>\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t<td>{$value->body}</td>\n\t\t\t\t\t<td>{$value->date}</td> \n                                </tbody>\n\t\t\t\t\t";
    echo '<td>';
    echo CHtml::link('<button class="btn btn-warning" type="submit">delete</button>', array('site/delet'));
    echo '</td>';
}
?>

<table>
</body>
</html>