Exporting by table

While not directly answering the question, I would strongly recommend you use a DB management application. phpMyAdmin IMO is a nightmare to work with, and as you have discovered, very difficult to manage large files. If you are on a Mac Sequal Pro is a really amazing app. If you don’t have external access to … Read more

quotes problem in very simple sql

if you’re communicating with the WordPress database itself, try using $wpdb->prepare() on your select string before running it as $wpdb->query() – it should format it for you. Further reading: Codex

Fetching review value using wpdb class

You need to add the global $wpdb reference and also add the second parameter required for prepare(): global $wpdb; $post_id = $post->ID; $reviewScore = $wpdb->query( $wpdb->prepare( “SELECT review FROM {$wpdb->prefix}gdsr_data_article WHERE post_id = %d”, $post_id ) );

post id not displaying

You call your header.php file by calling get_header() function in single.php file. It means that your $postid_profile variable exists only in scope of get_header() function. To make it visible in global scope you need to make your variable global. So your code should be modified like this: ### get the author info global $current_user, $postid_profile; … Read more

Show array of meta_value in Edit Post Coloum

The error was here: (Thank you @Rarst) if ($column_name == ‘custom_checkbox_group_sesso’) { $sesso_occupanti = get_post_meta($post_ID, “custom_checkbox_group_sesso”, true); //check that we have a custom field if ($sesso_occupanti != “”) { // Separate our comma separated list into an array $sesso_occupanti = explode(“,”, $sesso_occupanti); //loop through our new array foreach ($sesso_occupanti as $sesso) { echo $sesso ; … Read more

Export all posts to import as product items

You don’t have to export and then re-import, you can do it all via the API in one go, no XML required. here’s a quick example plugin: <?php /* Plugin Name: WPA_convert_types */ function wpa_convert_types_page() { add_management_page( ‘WPA convert types’, ‘WPA convert types’, ‘manage_options’, ‘wpa_convert_types’, ‘wpa_convert_types_render_page’ ); } add_action(‘admin_menu’, ‘wpa_convert_types_page’); function wpa_convert_types_render_page() { if( isset( … Read more

How to delete ALL comments from certain category in WordPress database?

The wordpress database seems fairly straight forward and is extremely well documented: http://codex.wordpress.org/Database_Description It seems to me that all the category information is stored in the table wp_term_relationships. So you should select from the comments table, join it with the posts table and then the term_relationships table in order to get the category for each … Read more