How to unserialize data from MySQL
As @Jacob said : To retrieve your option data : $your_data = get_option(‘option_tree’); To save your new data to the option : $new_data = array(…); update_option(‘option_tree’, $new_data);
As @Jacob said : To retrieve your option data : $your_data = get_option(‘option_tree’); To save your new data to the option : $new_data = array(…); update_option(‘option_tree’, $new_data);
Looking at the SQL query in $createSQL, ENGINE=InnoDB” . $wpdb->get_charset_collate() . ” AUTO_INCREMENT=1; yields to: Error in query (1286): Unknown storage engine ‘InnoDBDEFAULT’ To fix it, add a space between the ENGINE=InnoDB (the storage engine) and ” . $wpdb->get_charset_collate() (the charset). You have defined the column id as AUTO_INCREMENT, but the column is not a … Read more
The command SHOW GRANTS [FOR user] is what you’re looking for. See here for more detail.
When localhost parameter given, MySQL uses sockets. Use 127.0.0.1 instead.
That’s why I’m wondering why is WordPress stuck to this pre-PHP-5.3 limitation. Because WordPress has made the decision to support PHP 5.2 due to the large number of hosts that continue to use it. This is an ongoing debate and there’s no point rehashing it all here. But this means that I have to know … Read more
Encrypting the DB-Password in the wp-config.php is of no use, neither in your use-case nor in any other. What is encrypted, has to be decryptable by the system in order to access the database, which means if an attacker is able to get your wp-config.php, he can get everything he needs to decrypt the encrypted … Read more
You can try to trace in the PostgreSQL log file what pg_dump –table table –schema-only really does. Then you can use the same method to write your own sql function.
The post_id column in the wp_postmeta table is a reference to the ID column in the wp_posts table. I’d suggest using the native update_post_meta() function in WordPress to update the meta data. E.g. (Post ID is 123 in this example, and we’re updating the price to 100.00): update_post_meta(123, ‘_price’, ‘100.00’); Here is the SQL equivalent: … Read more
You should not modify the wordpress DB via SQL unless it is a total emergency. WordPress DB structure getting more complex with time and there are always possible intractions with plugins that you might bypass with direct SQL. What you should do is to write a small plugin that inserts the tags by calling using … Read more
Getting error “Warning: mysql_query(): Can’t connect to local MySQL server through socket ‘FILEPATH/cccatalog-plugin.php on line 1656”