I have tried dbDelta and $wpdb->query, they does not work. Does anyone has any ideas?
Leave a Reply
You must be logged in to post a comment.
I have tried dbDelta and $wpdb->query, they does not work. Does anyone has any ideas?
You must be logged in to post a comment.
As try today, truncate is WAY BETTER that DELETE, because DELETE broke the site, and trucate just empty the table, here is the working code :
According to this forum entry, truncate does not work. I would guess that since it’s such a destructive query, that it’s filtered by the class. There is also this Trac Post, which if I am reading it right, disallows DDL statements.
I know there are similar answers above but in the above answers, the table wp_post used if by mistake someone uses that code will lose his all posts.