$where_clauses = array( 'tl_namespace' => $this->getNamespace(), 'tl_title' => $this->getDBkey(), 'tl_from=pr_page', 'pr_cascade' => 1 );
}
+ $options = array ();
+
if ( $get_pages ) {
$where_clauses[] = 'page_id=pr_page';
$tables[] = 'page';
+ } else {
+ options[] = "LIMIT 1";
}
- #!$get_pages or die( var_dump( array( $cols, $tables, $where_clauses ) ) );
-
- $res = $dbr->select( $tables, $cols, $where_clauses, __METHOD__);
+ $res = $dbr->select( $tables, $cols, $where_clauses, __METHOD__, $options);
if ($dbr->numRows($res)) {
if ($get_pages) {