Add support for DAYOFMONTH( construct

git-svn-id: https://plugins.svn.wordpress.org/postgresql-for-wordpress/trunk@195486 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
hawk__
2010-01-19 19:50:28 +00:00
parent ce86463e48
commit 479270637b
2 changed files with 5 additions and 4 deletions

View File

@@ -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);

View File

@@ -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