Okay
  Public Ticket #2900526
Can the Premium version build SQL-statements
Closed

Comments

  • Stegemüller started the conversation

    I sent this question two days ago. How long is your response time?

    I am thinking about buying wpdatatables but I get a bit afraid, if you do not even answer a pre-purchase question

    Hello there

    I am trying to perform some SQL but I'm not good at it, I am still learning basic skills, so my SEO-project has stopped, because I can not find the posts I want to work on. And my site is huge (1.700 posts and more than 100 pages), so it is not possible to filter the posts manually.

    Will your tool make it possible to select posts with a specific category and specify tags that I do not want in my query?

    I have this query, and it should work, but no matter what I do, I get the same number of posts (458) whether I add "and name not like 'ect'" or not. My goal is to find posts in category "sundhed & sygdom" that do not have the tag "ect". Can your tool help me?

    SELECT ID, post_date, post_title, post_name FROM HBS_posts INNER JOIN HBS_term_relationships ON HBS_term_relationships.object_id = HBS_posts.ID INNER JOIN HBS_term_taxonomy ON HBS_term_taxonomy.term_taxonomy_id = HBS_term_relationships.term_taxonomy_id INNER JOIN HBS_terms ON HBS_terms.term_id = HBS_term_taxonomy.term_id Where name like 'sundhed & sygdom' and name not like 'ect' ORDER BY `HBS_posts`.`ID` DESC

    Kind regards,
    Hanne B. Stegemüller

  • [deleted] replied

    Hi Hanne

    If I am not mistaken, this is a duplicate ticket, so in case you missed my previous reply from a few days ago let me post it below:

    This can be achieved using MySQL query-based tables. If you're not that good with MySQL, you can try using our Query Constructor, but please note that this constructor is just a helper - it's not an ultimate query generator.

    It constructs a suggestion of a query, that you often need to modify to get the data you need. Included support for the plugin doesn't cover writing custom queries, so we wouldn't be able to help you with that.

    The query you pasted below needs to be created as a view in order to function properly inside wpDataTables.

    This is a complicated query so please have a look at the video and construct the view first then pull the data to wpDataTables and let me know if you still have any issues.

    Looking forward to hearing from you.