I want to change user role from the database,
UPDATE wp_usermeta
SET meta_value = 'a:1:{s:10:"subscriber";b:1;}'
WHERE meta_key = 'wp_capabilities'
AND meta_value = 'a:1:{s:9:"wpas_user";b:1;}';
but I get an error.
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''a:1:{s:10:"subscriber")' at line 1
I want to change user role from the database,
UPDATE wp_usermeta
SET meta_value = 'a:1:{s:10:"subscriber";b:1;}'
WHERE meta_key = 'wp_capabilities'
AND meta_value = 'a:1:{s:9:"wpas_user";b:1;}';
but I get an error.
Share Improve this question edited May 30, 2019 at 8:07 Jacob Peattie 44.2k10 gold badges50 silver badges64 bronze badges asked May 30, 2019 at 8:07 D.JCodeD.JCode 2013 silver badges12 bronze badges 3 |#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''a:1:{s:10:"subscriber")' at line 1
1 Answer
Reset to default 0Found it.
It was a field in phpMyAdmin which is set to a semicolon(;) by default.
I have changed it to an unused char and the query ran normally.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745452009a4628314.html
http://s8.picofile/file/8362076834/ttttt.PNG
– D.JCode Commented May 30, 2019 at 8:12;
. how can I solve that? – D.JCode Commented May 30, 2019 at 8:27