Changeset 774:d1875bf1202f for inc/core/class.dc.blog.php
- Timestamp:
- 11/29/11 08:47:14 (14 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inc/core/class.dc.blog.php
r744 r774 658 658 - order: Order of results (default "ORDER BY post_dt DES") 659 659 - limit: Limit parameter 660 - sql_only : return the sql request instead of results. Only ids are selected 660 661 661 662 Please note that on every cat_id or cat_url, you can add ?not to exclude … … 664 665 @param params <b>array</b> Parameters 665 666 @param count_only <b>boolean</b> Only counts results 666 @param sql_only <b>boolean</b> Only return SQL request667 667 @return <b>record</b> A record with some more capabilities or the SQL request 668 668 */ 669 public function getPosts($params=array(),$count_only=false ,$sql_only=false)669 public function getPosts($params=array(),$count_only=false) 670 670 { 671 671 # --BEHAVIOR-- coreBlogBeforeGetPosts … … 675 675 { 676 676 $strReq = 'SELECT count(P.post_id) '; 677 } 678 elseif (!empty($params['sql_only'])) 679 { 680 $strReq = 'SELECT P.post_id '; 677 681 } 678 682 else … … 844 848 } 845 849 846 if ( $sql_only) {850 if (!empty($params['sql_only'])) { 847 851 return $strReq; 848 852 } … … 1725 1729 - order: Order of results (default "ORDER BY comment_dt DES") 1726 1730 - limit: Limit parameter 1731 - sql_only : return the sql request instead of results. Only ids are selected 1727 1732 1728 1733 @param params <b>array</b> Parameters … … 1735 1740 { 1736 1741 $strReq = 'SELECT count(comment_id) '; 1742 } 1743 elseif (!empty($params['sql_only'])) 1744 { 1745 $strReq = 'SELECT P.post_id '; 1737 1746 } 1738 1747 else … … 1860 1869 $strReq .= $this->con->limit($params['limit']); 1861 1870 } 1871 1872 if (!empty($params['sql_only'])) { 1873 return $strReq; 1874 } 1862 1875 1863 1876 $rs = $this->con->select($strReq);
Note: See TracChangeset
for help on using the changeset viewer.