• Brand new CentOS 6 64bit VM with WP 3.6. I purchased a template where I need to import posts,etc.. When I try to upload it, it just has a blank screen.

    I tail apache error log and see the errors below. Any ideas? mysql-server-5.1.69-1
    PHP 5.3.3
    httpd-2.2.15-28

    [Fri Aug 09 23:43:14 2013] [error] [client ] 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 ” at line 1 for query SELECT term_taxonomy_id FROM wp_term_taxonomy WHERE term_id = made by require_once(‘wp-load.php’), require_once(‘wp-config.php’), require_once(‘wp-settings.php’), do_action(‘init’), call_user_func_array, mytheme_options, referer: http:///wp-admin/admin.php?import=wordpress%5BFri Aug 09 23:43:14 2013] [error] [client ] 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 ‘) AS termid ON termid.object_id = posts.IDnttORDER BY posts.menu_order DESCnttLI’ at line 7 for query nttSELECT posts.IDnttFROM wp_posts AS postsnttINNER JOIN (nttSELECT object_idnttFROM wp_term_relationshipsnttWHERE term_taxonomy_id = ntt) AS termid ON termid.object_id = posts.IDnttORDER BY posts.menu_order DESCnttLIMIT 1ntt made by require_once(‘wp-load.php’), require_once(‘wp-config.php’), require_once(‘wp-settings.php’), do_action(‘init’), call_user_func_array, mytheme_options, referer: http:///wp-admin/admin.php?import=wordpress

    http://wordpress.org/plugins/wordpress-importer/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hey

    Any ideas why “ntt” is showing in the query so much? I’ve never seen this. Google it and nothing comes up.

    If you can paste your actual code that could be great. To find it you could search “SELECT term_taxonomy_id FROM wp_term_taxonomy WHERE term_id”.

    Thread Starter tnats98332

    (@tnats98332)

    So, this has nothing to do with the file I’m going to import. I tail the apache error_log and when I click on Tools/Import in WP, This spits out before I even choose a file:

    [Sat Aug 10 22:01:53 2013] [error] [client <my ip>] 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 ” at line 1 for query SELECT term_taxonomy_id FROM wp_term_taxonomy WHERE term_id = made by require_once(‘wp-admin/admin.php’), require_once(‘wp-load.php’), require_once(‘wp-config.php’), require_once(‘wp-settings.php’), do_action(‘init’), call_user_func_array, mytheme_options, referer: http://<my domain>/wp-admin/plugins.php
    [Sat Aug 10 22:01:53 2013] [error] [client <my ip>] 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 ‘) AS termid ON termid.object_id = posts.ID\n\t\tORDER BY posts.menu_order DESC\n\t\tLI’ at line 7 for query \n\t\tSELECT posts.ID\n\t\tFROM wp_posts AS posts\n\t\tINNER JOIN (\n\t\tSELECT object_id\n\t\tFROM wp_term_relationships\n\t\tWHERE term_taxonomy_id = \n\t\t) AS termid ON termid.object_id = posts.ID\n\t\tORDER BY posts.menu_order DESC\n\t\tLIMIT 1\n\t\t made by require_once(‘wp-admin/admin.php’), require_once(‘wp-load.php’), require_once(‘wp-config.php’), require_once(‘wp-settings.php’), do_action(‘init’), call_user_func_array, mytheme_options, referer: http://<my domain>/wp-admin/plugins.php

    all I did was a yum install mysql-server, php and php-mysql. Latest version of CentOS 6 and WP. I even tried a WP 3.5.2 with the same issue.

    Thread Starter tnats98332

    (@tnats98332)

    Oh, the paste isn’t working correctly, the ntt is actually

    \n \t \t backslash n, backslash t and backslash t

    Ah ok I was thinking that was what your error log showed.

    The first query has near ” but there is no quote in the query sample itself. I’ll need to find the code itself if your not sure how to. Easiest way is a search. Will get back to you soon.

    Doing searches on WordPress core to find the query and not coming up with much. When I did find a query it was not the correct one.

    I searched on “SELECT term_taxonomy_id FROM $wpdb->term_taxonomy”

    Keep in mind $wpdb replaces the wp_ in your errors above. Please perform that search on your theme files. Try searching with wp_ instead of $wpdb however if wp_ is being used that is a mistake by the theme author.

    Paste any PHP from the search result please. Also consider running this by the theme author especially if you can use WordPress with another theme.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘WP Import – MySQL’ is closed to new replies.