Trouble with Fields (for filtering)
-
Hi, and thanks for the plugin which i have been using to produce reports on bookings for a community hall.
However I cannot seem to make the Fields work, so maybe someone could tell me where I am going wrong.
I create a report with sql below, all works well but when i add a field (fieldname = product, real field = a.ID as per a past enquiry it does not do what i hoped.
Firstly only one field (product) is now shown in the list.
Secondly a entry field is shown as well as search but an entry in that field does not select only that product.Ideally i would like a dropdown with the names of the products, is this possible maybe by incorporating some PHP in the sql string or some other way?
SELECT a.ID as product, a.post_title as name, p.order_item_id FROM
hmlu_posts
a
join hmlu_woocommerce_order_itemmeta p on a.ID = p.meta_value and p.meta_key = ‘_product_id’
where a.post_type = “product” and a.post_status = “publish”
- The topic ‘Trouble with Fields (for filtering)’ is closed to new replies.