WordPressのphpMyAdminを利用してデータを追加しようとしているのですが、追加できません。
そして、次のようなエラーが出ました。
WordPress データベースエラー:
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 '1' at line 1 for query 1 made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/test/test.php')
phpのコードはこんな感じです。
PHP
1$register = $wpdb->insert('wp_register', array( 2 'username' => $username, 3 'email' => $email, 4 'password' => $password, 5 'timestamp' => current_time('mysql') 6 )); 7 $wpdb->query($register);
それと、wp-db.phpにこのような記述もしています。
PHP
1 var $tables = array( 'posts', 'comments', 'links', 'options', 'postmeta', 2 'terms', 'term_taxonomy', 'term_relationships', 'termmeta', 'commentmeta', 'register');
どうか親切な方、このエラーを解決してください。よろしくお願いします。
回答1件
あなたの回答
tips
プレビュー