You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,6 +81,11 @@ PG4WP is provided "as-is" with no warranty in the hope it can be useful.
81
81
82
82
PG4WP is licensed under the [GNU GPL](http://www.gnu.org/licenses/gpl.html"GNU GPL") v2 or any newer version at your choice.
83
83
84
+
### Changelog
85
+
86
+
#### Latest Changes
87
+
- Fixed issue with SQL DELETE query rewriting to use DB_PREFIX consistently, which previously caused PostgreSQL syntax errors due to hardcoded table prefixes
88
+
84
89
### Contributors
85
90
Code originally by Hawk__ (http://www.hawkix.net/)
$sql = "DELETE a, b FROM custom_options a, custom_options b WHERE a.option_name = '_transient_timeout_something' AND b.option_name = '_transient_something' AND b.option_value < 12345678";
874
+
$postgresql = pg4wp_rewrite($sql);
875
+
$this->assertStringContainsString("DELETE FROM custom_options a USING custom_options b", $postgresql);
$sql = "DELETE a, b FROM custom_sitemeta a, custom_sitemeta b WHERE a.meta_key = '_site_transient_timeout_something' AND b.meta_key = '_site_transient_something' AND b.meta_value < 12345678";
880
+
$postgresql = pg4wp_rewrite($sql);
881
+
$this->assertStringContainsString("DELETE FROM custom_sitemeta a USING custom_sitemeta b", $postgresql);
0 commit comments