Can Anyone provide an example of RAW SQL for SELECTING posts by 2 or more tags

You seem to be catching wrong query. Dumping SQL for such URL (via posts_request filter) get me this: SELECT SQL_CALC_FOUND_ROWS wp_posts.* FROM wp_posts INNER JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) INNER JOIN wp_term_relationships AS tt1 ON (wp_posts.ID = tt1.object_id) WHERE 1=1 AND ( wp_term_relationships.term_taxonomy_id IN (93) AND tt1.term_taxonomy_id IN (94) AND wp_posts.ID IN ( SELECT … Read more

How to export 2 week’s worth of posts

The native import/export tool can do most of this, though I don’t think it will grab all the author profile information (not sure on that – I know it doesn’t bring over passwords, but it might bring the rest). In the WP admin panel go to Tools > Export and walk through the various option … Read more

Display latest post from WordPress Featured Category that is also in X,Y,or Z categories

Maybe this could help and should return any post either in 2, 3 or 4 category AND in categoery 1 : query_posts( array( ‘cat’ => array(2,3,4), ‘category__and’ => 1, ‘posts_per_page’ => 1, ‘orderby’ => ‘title’, ‘order’ => ‘DESC’ ) ); (from codex http://codex.wordpress.org/Function_Reference/query_posts) Not quite sure, haven’t tested it.

wordpress sql posts query won’t display the latest post in a specific category

I’d suggest using the WP_Query() class for this one. Hopefully the below will help you – <?php $args = array( ‘category_name’ => ‘photography’, ‘post_status’ => ‘publish’, ‘post_type’ => ‘post’, ‘posts_per_page’ => 5 ) $work_items = new WP_Query($args); if($work_items->have_posts()) : while($work_items->have_posts()) : $work_items->the_post() echo “<li>”; echo “<a href=”#” onClick=’title_to_contents(“.json_encode(get_the_title()).”)’>”; echo get_the_title(); echo “<span class=”project_date”>”.get_the_time(‘Y’).”https://wordpress.stackexchange.com/”.get_the_time(‘M’).”</span>”; echo “</a>”; … Read more

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

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)