1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

error in your SQL syntax...plz help thx

Discussion in 'MySQL' started by diamndlady, Jan 17, 2013.

  1. #1
    I have a plugin that I am having an issue with I am getting an error: CREATE TABLE IF NOT EXISTS 'wp_ig_caticons' (cat_id INT NOT NULL ,priority INT NOT NULL ,icon TEXT NOT NULL ,small_icon TEXT NOT NULL , PRIMARY KEY ( cat_id ))
    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_ig_caticons' (cat_id INT NOT NULL ,priority INT NOT NULL ,icon TEXT NOT NULL' at line 1

    the php code is :

    function ig_caticons_install() {
    global $wpdb, $table_prefix;
    $wpdb->query($wpdb->prepare("CREATE TABLE IF NOT EXISTS %s (cat_id INT NOT NULL ,priority INT NOT NULL ,icon TEXT NOT NULL ,small_icon TEXT NOT NULL , PRIMARY KEY ( cat_id ))", $wpdb->ig_caticons));
    add_option('igcaticons_path', '');
    add_option('igcaticons_url', '');
    add_option('igcaticons_filetypes', 'jpg gif jpeg png');
    add_option('igcaticons_max_icons','3');
    add_option('igcaticons_before_name','true');
    add_option('igcaticons_fit_width','-1');
    add_option('igcaticons_fit_height','-1');
    add_option('igcaticons_use_small','true');
    add_option('igcaticons_templatecode_patch','0');
    add_option('igcaticons_templatecode_sidebar','1');
    add_option('igcaticons_rssfeeds','1');
    add_option('igcaticons_useseo_plugin', '0');
    add_option('igcaticons_max_width','-1');
    add_option('igcaticons_max_height','-1');
    add_option('igcaticons_iconcatpage','0');
    }
     
    Last edited: Jan 17, 2013
    diamndlady, Jan 17, 2013 IP