Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter roshan.gade

    (@roshangade)

    Hi Russell,

    I edited “iire_social_install.php” file from plugin folder and removed INSERT query from the middle part and at the bottom added the following REPLACE query.

    if (get_site_option('iire_social_data') < '1.6.0') {
    	$wpdb->query("REPLACE INTO $table (option_id, option_name, option_value) VALUES ('62', 'widget_effect', '')");
    	$wpdb->query("REPLACE INTO $table (option_id, option_name, option_value) VALUES ('101', 'sc_effect', '')");
    }

    If you will see following if condition carefully in iire_social_install.php file, it already adds both rows i.e. 62 and 101.

    if (get_site_option('iire_social_data') == '0') {
    // INSERT queries
    }

    For more info:
    The MySQL REPLACE statement is a MySQL extension to the SQL standard. The MySQL REPLACE statement works like the INSERT statement with the additional rules:

    • If the record which you want to insert does not exist, the MySQL REPLACE inserts a new record.
    • If the record which you want to insert already exists, MySQL REPLACE deletes the old record first and then insert a new record.

    Thanks,
    Roshan

    Thread Starter roshan.gade

    (@roshangade)

    Hi Russell,

    Thanks for your replies. I tried your both the solutions that you have said above, but still it didn’t work for me.

    I installed a new wordpress on local machine and fresh version of iiRe Social Icons(1.6.0.), but I got the same errors. Then I edited “iire_social_install.php” file from plugin folder and changed INSERT query to REPLACE query and it works for me, and stopped showing errors.

    Thanks,
    Roshan.

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