Problem with LIMIT
-
This is my query:
SELECT p.ID,p.post_title,p.post_content, (SELECT group_concat(wp_terms.name separator ', ') FROM wp_terms INNER JOIN wp_term_taxonomy on wp_terms.term_id = wp_term_taxonomy.term_id INNER JOIN wp_term_relationships wpr on wpr.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id WHERE taxonomy= 'category' and p.ID = wpr.object_id ) AS "Categories", CONCAT('http://www.festivalvantalent.nl/algemeen/aanbieders/', p.post_name) as post_name,p.post_status, (select m1.meta_value from wp_postmeta as m1 where m1.post_id = p.ID AND m1.meta_key = 'organisatie' order by m1.meta_id DESC LIMIT 0,1) as organisatie, (select m1.meta_value from wp_postmeta as m1 where m1.post_id = p.ID AND m1.meta_key = 'contactpersoon' order by m1.meta_id DESC LIMIT 0,1) as contactpersoon, (select m1.meta_value from wp_postmeta as m1 where m1.post_id = p.ID AND m1.meta_key = 'e-mailadres' order by m1.meta_id DESC LIMIT 0,1) as emailadres, (select m1.meta_value from wp_postmeta as m1 where m1.post_id = p.ID AND m1.meta_key = 'aanmelden' order by m1.meta_id DESC LIMIT 0,1) as aanmelden, (select m1.meta_value from wp_postmeta as m1 where m1.post_id = p.ID AND m1.meta_key = 'lokaal' order by m1.meta_id DESC LIMIT 0,1) as lokaal, p.post_date, p.post_modified FROM wp_posts AS p LEFT OUTER JOIN wp_term_relationships r ON r.object_id = p.ID LEFT OUTER JOIN wp_term_taxonomy x ON x.term_taxonomy_id = r.term_taxonomy_id LEFT OUTER JOIN wp_terms t ON t.term_id = x.term_id WHERE p.post_type = 'post' and p.post_status = 'publish' and t.slug = 'aanbieders'But when viewing the report is doesn’t have a result, because it changes my LIMIT 0,1) to LIMIT 0,25 1). (I also tried LIMIT 1, but that doesn’t help.)
Can this be resolved?
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
The topic ‘Problem with LIMIT’ is closed to new replies.