sqlgetvar shortcode
-
Hi Eli,
First off, thanks for such a great plug-in!
I’m trying to use the [sqlgetvar] short code but I am not getting any output. I have created a report that returns a single column with a single row. I need the value to displayed without the table.
Here is the code I’m using (it’s tested and returns the correct value as a report) :
SELECT TRIM(SUBSTRING( SUBSTRING( p.post_content, INSTR(p.post_content, 'Event Poster') + 19, 256 ), 1, INSTR(SUBSTRING( p.post_content, INSTR(p.post_content, 'Event Poster') + 19, 256 ), ' show_in_lightbox="on"' ) - 2 ) ) AS Poster FROM wp_posts p INNER JOIN wp_term_relationships tr ON tr.object_id = p.id INNER JOIN wp_term_taxonomy tt ON tt.term_taxonomy_id = tr.term_taxonomy_id INNER JOIN wp_terms t ON t.term_id = tt.term_id WHERE p.post_type = 'project' AND p.post_status = 'publish' AND tt.taxonomy = 'project_category' AND p.post_title <> '' AND DATE_FORMAT(STR_TO_DATE((SELECT meta_value FROM wp_postmeta WHERE post_id = p.id AND meta_key = 'inba_event_date' LIMIT 1 ), '%m/%d/%Y'), '%m/%d/%Y') > DATE_FORMAT(NOW(), '%m/%d/%Y' ) ORDER BY DATE_FORMAT(STR_TO_DATE((SELECT meta_value FROM wp_postmeta WHERE post_id = p.id AND meta_key = 'inba_event_date' LIMIT 1 ), '%m/%d/%Y'), '%m/%d/%Y') ASC LIMIT 1
Are there any limitations to the [sqlgetvar] shortcode?
Your help is greatly appreciated.
Thanks,
Andy
- The topic ‘sqlgetvar shortcode’ is closed to new replies.