Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database error do_action(admi_init) #36

Closed
mplusb opened this issue Jan 25, 2019 · 1 comment
Closed

Database error do_action(admi_init) #36

mplusb opened this issue Jan 25, 2019 · 1 comment

Comments

@mplusb
Copy link

mplusb commented Jan 25, 2019

Query:
UPDATE wp_posts as pt JOIN (
SELECT ID, (@row_number:=@row_number + 1) AS rank
FROM wp_posts
WHERE post_type = ‘product’
AND post_status IN ( ‘publish’, ‘pending’, ‘draft’, ‘private’, ‘future’ )
ORDER BY menu_order ASC ) as pt2
ON pt.id = pt2.id
SET pt.menu_order = pt2.rank;

Caller:
do_action(‘admin_init’)

Component:
Core

Error message:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘rank FROM wp_posts WHERE post_type = ‘prod’ at line 2

Error code:
1064

https://wordpress.org/support/topic/database-error-do_actionadmi_init/

@razvanaldea89
Copy link
Contributor

I believe there is a pull request for this one. #37

@giucu91 giucu91 closed this as completed Jun 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants