I am pulling a column in an existing script into my template files, and everything is working great.
The only problem is, that this script has a column called
ORDER BY name
ORDER BY order
SELECT * FROM categories WHERE hide = 0 ORDER BY order
order is a keyword in SQL. So if you wish to use a keyword as a name, use backtick characters around it:
SELECT * FROM categories WHERE hide = 0 ORDER BY `order`
Try that :)