Skip to content

Instantly share code, notes, and snippets.

@dpdexter
Last active December 12, 2015 08:48
Show Gist options
  • Save dpdexter/4746493 to your computer and use it in GitHub Desktop.
Save dpdexter/4746493 to your computer and use it in GitHub Desktop.
{exp:query sql="
SELECT
title as category_title,
url_title as category_url_title,
image as category_image,
FROM exp_br_category,
WHERE parent_id = 0
ORDER BY sort
"}
Title: {category_title}<br />
URL Title: {category_url_title}<br />
Image: {category_image}<br />
{/exp:query}
@amityweb
Copy link

Just need some commas after the fields...

{exp:query sql="
SELECT
title as category_title,
url_title as category_url_title,
image as category_image
FROM exp_br_category
WHERE parent_id = 0
ORDER BY sort
"}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment