Problem with update + order by.
-
Hi!
While are using this plugin, I’ve a problem with editing pages.
In PG4WP logs I found this:
———————
[1606512645.3863] Error running :
SELECT p.ID FROM wp_posts p WHERE post_type=’scheduled-action’ AND p.post_status=’pending’ AND p.post_modified_gmt <= ‘2020-11-27 21:25:45′ AND p.post_password != ” ORDER BY p.post_date_gmt ASC LIMIT 0, 20
—- converted to —-
SELECT p.”ID” FROM wp_posts p WHERE post_type=’scheduled-action’ AND p.post_status=’pending’ AND p.post_modified_gmt <= ‘2020-11-27 21:25:45’ AND p.post_password <> 0 ORDER BY p.post_date_gmt ASC LIMIT 20 OFFSET 0
—-> ERROR: operator does not exist: character varying <> integer
LINE 1: …_gmt <= ‘2020-11-27 21:25:45’ AND p.post_password <> 0 ORDER…
^
HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
———————
[1606512645.4773] Error running :
UPDATE wp_posts SET post_password = ‘c259d5877cdad7210992’, post_modified_gmt = ‘2020-11-27 21:30:45’, post_modified = ‘2020-11-27 22:30:45’ WHERE post_type = ‘scheduled-action’ AND post_status = ‘pending’ AND post_password = ” AND post_date_gmt <= ‘2020-11-27 21:30:45’ ORDER BY menu_order ASC, post_date_gmt ASC, ID ASC LIMIT 25
—- converted to —-
UPDATE wp_posts SET post_password = ‘c259d5877cdad7210992’, post_modified_gmt = ‘2020-11-27 21:30:45’, post_modified = ‘2020-11-27 22:30:45’ WHERE post_type = ‘scheduled-action’ AND post_status = ‘pending’ AND post_password = ” AND post_date_gmt <= ‘2020-11-27 21:30:45’ ORDER BY menu_order ASC, post_date_gmt ASC, ID ASC
—-> ERROR: syntax error at or near “ORDER”
LINE 1: …d = ” AND post_date_gmt <= ‘2020-11-27 21:30:45’ ORDER BY m…
^
———————Any one have fix for that?
- The topic ‘Problem with update + order by.’ is closed to new replies.