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 is a keyword in SQL. So if you wish to use a keyword as a name, use backtick characters around it:
order
SELECT * FROM categories WHERE hide = 0 ORDER BY `order`
Try that :)