17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1037 Views |
-
JOIN and number of records (MoreThanOnePage and others)

9 December 2008 at 4:32am
Hello
I'm using JOIN to get articles commented by user. Query works ok, but the number of result records is wrong. Predefined variables (NewsArticles.Pages, MoreThanOnePage and others) have wrong values (to big).
This is my query:$doSet = DataObject::get(
$callerClass = "ArticlePage",
$filter = "`SiteTree`.ParentID = '".$this->ID."' AND `Name` = '".PssMember::currentUser()->Login."'",
$sort = "`SiteTree`.Created DESC",
$join = " JOIN `PageComment` ON `ArticlePage`.ID = `PageComment`.ParentID",
$limit = "{$SQL_start},2"
);How can I get correct number of records? When use JOINs I have to manulay set this variables?
| 1037 Views | ||
|
Page:
1
|
Go to Top |

