Support

Account

Home Forums General Issues Sum fields via MySQL Reply To: Sum fields via MySQL

  • It is practicably not possible to do what you want to do without doing multiple queries. The reason for this is that there is no connection between the two meta fields other than the post ID column of the postmata table.

    First you would need to do a query to get all of the post IDs where “type” == 1 for example. Then you would need to do a query using

    
    "WHERE post_id IN({$LIST_OF_POST_IDs) AND meta_key = 'field_name'"