You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY date_origin ASC' at line 1
SELECT * FROM app_lnk al INNER JOIN app_content ac ON al.link_child = ac.id AND al.link_child_type = 'content' WHERE link_parent_type = 'epic' AND link_parent = ORDER BY date_origin ASC