Changeset 2316:f8620977a163 for inc
- Timestamp:
- 10/09/13 06:44:16 (12 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inc/core/class.dc.blog.php
r2315 r2316 775 775 elseif (!empty($params['sql_only'])) 776 776 { 777 $strReq = 'SELECT P.post_id '; 777 if ($this->core->con->driver() == 'pgsql' && isset($params['media'])) { 778 $strReq = 'SELECT DISTINCT ON (P.post_id) P.post_id '; 779 } else { 780 $strReq = 'SELECT P.post_id '; 781 } 778 782 } 779 783 else … … 791 795 } 792 796 793 $strReq = 794 'SELECT P.post_id, P.blog_id, P.user_id, P.cat_id, post_dt, '. 797 if ($this->core->con->driver() == 'pgsql' && isset($params['media'])) { 798 $strReq = 'SELECT DISTINCT ON (P.post_id) '; 799 } else { 800 $strReq = 'SELECT '; 801 } 802 $strReq .= 803 'P.post_id, P.blog_id, P.user_id, P.cat_id, post_dt, '. 795 804 'post_tz, post_creadt, post_upddt, post_format, post_password, '. 796 805 'post_url, post_lang, post_title, '.$content_req. … … 958 967 } 959 968 960 if ( !$count_only && isset($params['media'])) {969 if ($this->core->con->driver() != 'pgsql' && !$count_only && isset($params['media'])) { 961 970 $strReq .= ' GROUP BY P.post_id '; 962 971 }
Note: See TracChangeset
for help on using the changeset viewer.