Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Res {
- public $id;
- public $pagetitle;
- public function info()
- {
- return '#'.$this->id.': '.$this->pagetitle . ' - ' . $this->longtitle;
- }
- }
- $query = "SELECT id,pagetitle,longtitle FROM modx_site_content WHERE id > :id LIMIT 12000";
- $id = 10;
- $result = $modx->prepare($query);
- $result->setFetchMode(PDO::FETCH_CLASS, 'Res');
- $result->execute(array(':id' => $id));
- while ($res = $result->fetch()) {
- echo $res->info().'<br />'."\n";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement