Advertisement
vanchelo

Untitled

Oct 11th, 2012
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.44 KB | None | 0 0
  1. <?php
  2. $time = microtime(true);
  3. $c = $modx->newQuery('modResource');
  4. $c->select(array('id','pagetitle'));
  5. $c->where(array('id:<' => 1000));
  6.  
  7. for ($i = 1000; $i >= 0; $i--) {
  8.     if($c->prepare() && $c->stmt->execute()) {
  9.         $collection = $c->stmt->fetchAll(PDO::FETCH_ASSOC);
  10.     }
  11.     foreach ($collection as $key => $value) {
  12.         echo '<pre>';
  13.         print_r($value);
  14.         echo '</pre>';
  15.     }
  16. }
  17. echo microtime(true) - time(); die;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement