Query failed:

SELECT * FROM tree t WHERE alias = 'js/'+$(this).data('thickbox').img+'' AND public = 1 AND publicFrom < NOW() AND publicTo > NOW()

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.data('thickbox').img+'' AND public = 1 AND publicFrom < NOW() AND publicTo' at line 3