Created
March 17, 2014 11:31
-
-
Save andrebian/9597741 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$this->Filter->addFilters('Filtro', array('LIKE' => __('contendo', true))); | |
$this->Filter->setPaginate('limit', 6); // opcional | |
$this->Filter->setPaginate('group', 'Qname.queue'); | |
$this->Filter->setPaginate('fields', array('COUNT(QueueStat.qname) as Total', 'Qname.queue', 'Qevent.event', 'Qevent.event_id')); | |
$this->Filter->setPaginate('conditions', $this->Filter->getConditions()); | |
$this->QueueStat->recursive = 0; | |
$this->set('queuestats', $this->paginate()); | |
$this->Filter->setPaginate('limit', 6); | |
$this->Filter->setPaginate('group', 'Qname.queue', 'Qevent.event', 'Qevent.event_id'); | |
$this->Filter->setPaginate('fields', array('COUNT(QueueStat.qname) as Atendidas', 'Qname.queue', 'Qevent.event', 'Qevent.event_id')); | |
$this->Filter->setPaginate('conditions', array('Qevent.event_id = 12')); | |
$this->QueueStat->recursive = 0; | |
$this->set('eventos', $this->paginate()); | |
?> | |
passando as variaveis, queuestats e eventos para usar no foreach! | |
e la na VIEW eu to querendo usar assim... | |
<table> | |
<?php foreach ($queuestats as $queuestat)(think)> | |
<?php foreach ($eventos as $evento)(think)> | |
<tr class="success"> | |
<td><?php echo $queuestat['Qname']['queue']; ?></td> | |
<td><?php echo $queuestat[0]['Total']; ?></td> | |
<td><?php echo $evento[0]['Atendidas']; ?></td> | |
</tr> | |
<?php endforeach;?> | |
<?php endforeach;?> | |
</table> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment