|
Revision 12, 0.7 kB
(checked in by francois, 6 years ago)
|
optimized number of requests on homepage
|
- Property svn:mime-type set to
text/x-php
- Property svn:eol-style set to
native
- Property svn:keywords set to
Id
|
| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
require_once 'model/om/BaseSnippetCommentPeer.php'; |
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
include_once 'model/SnippetComment.php'; |
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
class SnippetCommentPeer extends BaseSnippetCommentPeer { |
|---|
| 22 |
|
|---|
| 23 |
public function getLatests($max) |
|---|
| 24 |
{ |
|---|
| 25 |
$c = new Criteria(); |
|---|
| 26 |
$c->addDescendingOrderByColumn(self::CREATED_AT); |
|---|
| 27 |
$c->setLimit($max); |
|---|
| 28 |
return self::doSelectJoinAll($c); |
|---|
| 29 |
} |
|---|
| 30 |
|
|---|
| 31 |
} |
|---|
| 32 |
|
|---|