DB Error messages in Log File

Discussion in 'Local Business WordPress Theme' started by brayworth, Nov 23, 2013.

  1. brayworth

    brayworth Guest

    Joined:
    Oct 11, 2013
    Messages:
    1
    Likes Received:
    0
    Below is a copy of what I get in my error log

    There seems to be a syntax error on line 91 of functions.php
    // this if statement makes sure that the table doe not exist already
    if($wpdb->get_var("show tables like inkthemes_info") != 'inkthemes_info')
    Is the fix just to surround with quotes
    if($wpdb->get_var("show tables like 'inkthemes_info'") != 'inkthemes_info')

    ==> /var/log/messages <==
    Nov 23 05:14:19 server80 httpd: 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 'inkthemes_info' at line 1 for query show tables like inkthemes_info made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('init'), call_user_func_array, my_plugin_create_table
    Nov 23 05:14:19 server80 httpd: WordPress database error Duplicate column name 'date' for query ALTER TABLE inkthemes_info ADD COLUMN date#011date#011NOT NULL made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('init'), call_user_func_array, my_plugin_create_table, dbDelta




     
  2. Gourav

    Gourav Support Staff

    Joined:
    Oct 19, 2012
    Messages:
    7,728
    Likes Received:
    207
    Hello,

    Go to wp-config.php file present in your wordpress directory and follow the instruction as shown in image given below

    [​IMG]


    This will solve your issue.
     
  3. darrel

    darrel New Member

    Joined:
    Oct 8, 2012
    Messages:
    14
    Likes Received:
    0
    I am receiving the exact same error in my error log.

    [12-Sep-2014 14:04:47 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 'inkthemes_info' at line 1 for query show tables like inkthemes_info made by require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('init'), call_user_func_array, my_plugin_create_table
    [12-Sep-2014 14:04:47 UTC] WordPress database error Duplicate column name 'date' for query ALTER TABLE inkthemes_info ADD COLUMN date date NOT NULL made by require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('init'), call_user_func_array, my_plugin_create_table, dbDelta

    I checked my wp-config.php file and it already has define('WP_DEBUG', false);
    Something else????
     

Share This Page