diff --git a/pg4wp/driver_pgsql.php b/pg4wp/driver_pgsql.php index 65ae3e0..7d470db 100644 --- a/pg4wp/driver_pgsql.php +++ b/pg4wp/driver_pgsql.php @@ -152,9 +152,10 @@ $sql = preg_replace( $pattern, '($1 + $2)', $sql); $date_funcs = array( - 'YEAR(' => 'EXTRACT(YEAR FROM ', - 'MONTH(' => 'EXTRACT(MONTH FROM ', - 'DAY(' => 'EXTRACT(DAY FROM ', + 'YEAR(' => 'EXTRACT(YEAR FROM ', + 'MONTH(' => 'EXTRACT(MONTH FROM ', + 'DAY(' => 'EXTRACT(DAY FROM ', + 'DAYOFMONTH(' => 'EXTRACT(DAY FROM ', ); $sql = str_replace( 'ORDER BY post_date DESC', 'ORDER BY YEAR(post_date) DESC, MONTH(post_date) DESC', $sql); diff --git a/readme.txt b/readme.txt index 0c382f6..3824d07 100644 --- a/readme.txt +++ b/readme.txt @@ -50,7 +50,7 @@ There is no screenshot for this plugin == Changelog == - +* Added DAYOFMONTH support (Thanks to Pete Deffendol for noticing the problem) * Upgrading from WP 2.8.6 to WP 2.9.1 works with a minor error Upgrading should remove an index on table "wp_options" that may not exist, throwing an error * Installing WP 2.9.1 works smoothly