sql

SELECT t3.title as adverteerder , t.post_date as datum , (select t2.meta_value FROM wp_vrzbepostmeta t2 where t.id = t2.post_id LIMIT 5,1 ) as Email , (select t2.meta_value FROM wp_vrzbepostmeta t2 where t.id = t2.post_id LIMIT 7,1 ) as datum1 , (select t2.meta_value FROM wp_vrzbepostmeta t2 where t.id = t2.post_id LIMIT 8,1 ) as datum2 , (select t2.meta_value FROM wp_vrzbepostmeta t2 where t.id = t2.post_id LIMIT 9,1 ) as aantal_personen , (select t2.meta_value FROM wp_vrzbepostmeta t2 where t.id = t2.post_id LIMIT 10,1 ) as budget FROM `wp_vrzbeposts` t , wp_vrzbepostmeta t2 , `wp_vrzbenf3_forms` t3 where t.post_type = ‘nf_sub’ and t.id = t2.post_id and (t2.meta_key = ‘_form_id’) and t3.id = t2.meta_value order by t.post_date desc

FE

SELECT t3.title as adverteerder
, t.post_date as datum
, (select t2.meta_value FROM wp_vrzbepostmeta t2 where t.id = t2.post_id LIMIT 5,1 ) as Email
, (select t2.meta_value FROM wp_vrzbepostmeta t2 where t.id = t2.post_id LIMIT 7,1 ) as datum1
, (select t2.meta_value FROM wp_vrzbepostmeta t2 where t.id = t2.post_id LIMIT 8,1 ) as datum2
, (select t2.meta_value FROM wp_vrzbepostmeta t2 where t.id = t2.post_id LIMIT 9,1 ) as aantal_personen
, (select t2.meta_value FROM wp_vrzbepostmeta t2 where t.id = t2.post_id LIMIT 10,1 ) as budget
FROM `wp_vrzbeposts` t
, wp_vrzbepostmeta t2
, `wp_vrzbenf3_forms` t3
where t.post_type = ‘nf_sub’
and t.id = t2.post_id
and (t2.meta_key = ‘_form_id’)
and t3.id = t2.meta_value
and t3.title like ‘%Felicity Events%’
order by t.post_date desc