在wordpress更新到3.5以上版本后,我在这个插件中发现了许多错误。我发现原因是:http://make.wordpress.org/core/2012/12/12/php-warning-missing-argument-2-for-wpdb-prepare/
我不知道如何修理它。如果有人能帮我解决这些问题,或者给我一个如何解决的例子。
这是插件核心文件http://pastebin.com/Tk5Gf1HR
WordPress database error 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 ‘wp_jsrm_menus’ at line 1 for query SHOW TABLES LIKE wp_jsrm_menus made by activate_plugin, do_action(‘activate_simple-retail-menus/simple-retail-menus.php’), call_user_func_array, jsrm_activate_loop, jsrm_activate
WordPress database error 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 ‘wp_jsrm_items’ at line 1 for query SHOW TABLES LIKE wp_jsrm_items made by activate_plugin, do_action(‘activate_simple-retail-menus/simple-retail-menus.php’), call_user_func_array, jsrm_activate_loop, jsrm_activate
PHP Warning: Missing argument 2 for wpdb::prepare(), called in /wp-content/plugins/simple-retail-menus/simple-retail-menus.php on line 169 and defined in /wp-includes/wp-db.php on line 992
PHP Warning: mysql_fetch_array() expects parameter 1 to be resource, integer given in /wp-content/plugins/simple-retail-menus/simple-retail-menus.php on line 170
PHP Warning: Missing argument 2 for wpdb::prepare(), called in /wp-content/plugins/simple-retail-menus/simple-retail-menus.php on line 173 and defined in /wp-includes/wp-db.php on line 992
WordPress database error Duplicate column name ‘menuorder’ for query ALTER TABLE wp_jsrm_menus ADD menuorder mediumint(9) NOT NULL made by activate_plugin, do_action(‘activate_simple-retail-menus/simple-retail-menus.php’), call_user_func_array, jsrm_activate_loop, jsrm_activate, jsrm_update_db_tables
PHP Warning: Missing argument 2 for wpdb::prepare(), called in /wp-content/plugins/simple-retail-menus/simple-retail-menus.php on line 176 and defined in /wp-includes/wp-db.php on line 992
WordPress database error Duplicate column name ‘label’ for query ALTER TABLE wp_jsrm_menus ADD label tinytext NOT NULL made by activate_plugin, do_action(‘activate_simple-retail-menus/simple-retail-menus.php’), call_user_func_array, jsrm_activate_loop, jsrm_activate, jsrm_update_db_tables
PHP Warning: Missing argument 2 for wpdb::prepare(), called in /wp-content/plugins/simple-retail-menus/simple-retail-menus.php on line 179 and defined in /wp-includes/wp-db.php on line 992
WordPress database error Duplicate column name ‘itemheader’ for query ALTER TABLE wp_jsrm_menus ADD itemheader tinytext NOT NULL made by activate_plugin, do_action(‘activate_simple-retail-menus/simple-retail-menus.php’), call_user_func_array, jsrm_activate_loop, jsrm_activate, jsrm_update_db_tables
PHP Warning: Missing argument 2 for wpdb::prepare(), called in /wp-content/plugins/simple-retail-menus/simple-retail-menus.php on line 182 and defined in /wp-includes/wp-db.php on line 992
WordPress database error Duplicate column name ‘valueheader’ for query ALTER TABLE wp_jsrm_menus ADD valueheader tinytext NOT NULL made by activate_plugin, do_action(‘activate_simple-retail-menus/simple-retail-menus.php’), call_user_func_array, jsrm_activate_loop, jsrm_activate, jsrm_update_db_tables
PHP Warning: Missing argument 2 for wpdb::prepare(), called in /wp-content/plugins/simple-retail-menus/simple-retail-menus.php on line 189 and defined in /wp-includes/wp-db.php on line 992
WordPress database error Duplicate column name ‘valueheader2′ for query ALTER TABLE wp_jsrm_menus ADD valueheader2 tinytext NOT NULL made by activate_plugin, do_action(‘activate_simple-retail-menus/simple-retail-menus.php’), call_user_func_array, jsrm_activate_loop, jsrm_activate, jsrm_update_db_tables
PHP Warning: Missing argument 2 for wpdb::prepare(), called in /wp-content/plugins/simple-retail-menus/simple-retail-menus.php on line 193 and defined in /wp-includes/wp-db.php on line 992
HP Warning: mysql_fetch_array() expects parameter 1 to be resource, integer given in /wp-content/plugins/simple-retail-menus/simple-retail-menus.php on line 194
PHP Warning: Missing argument 2 for wpdb::prepare(), called in /wp-content/plugins/simple-retail-menus/simple-retail-menus.php on line 197 and defined in /wp-includes/wp-db.php on line 992
WordPress database error Duplicate column name ‘image’ for query ALTER TABLE wp_jsrm_items ADD image tinytext made by activate_plugin, do_action(‘activate_simple-retail-menus/simple-retail-menus.php’), call_user_func_array, jsrm_activate_loop, jsrm_activate, jsrm_update_db_tables
PHP Warning: Missing argument 2 for wpdb::prepare(), called in /wp-content/plugins/simple-retail-menus/simple-retail-menus.php on line 200 and defined in /wp-includes/wp-db.php on line 992
WordPress database error Duplicate column name ‘linked’ for query ALTER TABLE wp_jsrm_items ADD linked tinyint(1) NOT NULL made by activate_plugin, do_action(‘activate_simple-retail-menus/simple-retail-menus.php’), call_user_func_array, jsrm_activate_loop, jsrm_activate, jsrm_update_db_tables
PHP Warning: Missing argument 2 for wpdb::prepare(), called in /wp-content/plugins/simple-retail-menus/simple-retail-menus.php on line 203 and defined in /wp-includes/wp-db.php on line 992
WordPress database error Duplicate column name ‘linkurl’ for query ALTER TABLE wp_jsrm_items ADD linkurl tinytext made by activate_plugin, do_action(‘activate_simple-retail-menus/simple-retail-menus.php’), call_user_func_array, jsrm_activate_loop, jsrm_activate, jsrm_update_db_tables
PHP Warning: Missing argument 2 for wpdb::prepare(), called in /wp-content/plugins/simple-retail-menus/simple-retail-menus.php on line 206 and defined in /wp-includes/wp-db.php on line 992
WordPress database error Duplicate column name ‘itemhidden’ for query ALTER TABLE wp_jsrm_items ADD itemhidden tinyint(1) NOT NULL made by activate_plugin, do_action(‘activate_simple-retail-menus/simple-retail-menus.php’), call_user_func_array, jsrm_activate_loop, jsrm_activate, jsrm_update_db_tables
PHP Notice: Undefined variable: vh in /wp-content/plugins/simple-retail-menus/simple-retail-menus.php on line 212
PHP Warning: Missing argument 2 for wpdb::prepare(), called in /wp-content/plugins/simple-retail-menus/simple-retail-menus.php on line 213 and defined in /wp-includes/wp-db.php on line 992
WordPress database error Duplicate column name ‘value2′ for query ALTER TABLE wp_jsrm_items ADD value2 tinytext NOT NULL made by activate_plugin, do_action(‘activate_simple-retail-menus/simple-retail-menus.php’), call_user_func_array, jsrm_activate_loop, jsrm_activate, jsrm_update_db_tables
the errors comes from this code: i tried to fix as Charles Clarkson suggested but seems not helping.
[11-Oct-2013 05:27:09 UTC] WordPress database error 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 \'wp_jsrm_menus\' at line 1 for query SHOW TABLES LIKE wp_jsrm_menus made by activate_plugin, do_action(\'activate_simple-retail-menus/simple-retail-menus.php\'), call_user_func_array, jsrm_activate_loop, jsrm_activate
[11-Oct-2013 05:27:09 UTC] WordPress database error 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 \'wp_jsrm_items\' at line 1 for query SHOW TABLES LIKE wp_jsrm_items made by activate_plugin, do_action(\'activate_simple-retail-menus/simple-retail-menus.php\'), call_user_func_array, jsrm_activate_loop, jsrm_activate
[11-Oct-2013 05:27:11 UTC] WordPress database error 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 \'wp_jsrm_menus\' at line 1 for query SHOW TABLES LIKE wp_jsrm_menus made by do_action(\'activate_simple-retail-menus/simple-retail-menus.php\'), call_user_func_array, jsrm_activate_loop, jsrm_activate
[11-Oct-2013 05:27:11 UTC] WordPress database error 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 \'wp_jsrm_items\' at line 1 for query SHOW TABLES LIKE wp_jsrm_items made by do_action(\'activate_simple-retail-menus/simple-retail-menus.php\'), call_user_func_array, jsrm_activate_loop, jsrm_activate
[11-Oct-2013 05:27:11 UTC] WordPress database error 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 \'wp_jsrm_menus\' at line 1 for query SHOW TABLES LIKE wp_jsrm_menus made by do_action(\'activate_simple-retail-menus/simple-retail-menus.php\'), call_user_func_array, jsrm_activate_loop, jsrm_activate
[11-Oct-2013 05:27:11 UTC] WordPress database error 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 \'wp_jsrm_items\' at line 1 for query SHOW TABLES LIKE wp_jsrm_items made by do_action(\'activate_simple-retail-menus/simple-retail-menus.php\'), call_user_func_array, jsrm_activate_loop, jsrm_activate
[11-Oct-2013 05:30:45 UTC] WordPress database error 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 \'wp_jsrm_menus\' at line 1 for query SHOW TABLES LIKE wp_jsrm_menus made by activate_plugin, do_action(\'activate_simple-retail-menus/simple-retail-menus.php\'), call_user_func_array, jsrm_activate_loop, jsrm_activate
[11-Oct-2013 05:30:45 UTC] WordPress database error 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 \'wp_jsrm_items\' at line 1 for query SHOW TABLES LIKE wp_jsrm_items made by activate_plugin, do_action(\'activate_simple-retail-menus/simple-retail-menus.php\'), call_user_func_array, jsrm_activate_loop, jsrm_activate