A Database Error Occurred

Error Number: 1064

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 taxonomy_term_data.weight' at line 4

SELECT taxonomy_term_data.tid,taxonomy_term_data.name ,taxonomy_term_data.weight FROM taxonomy_term_data,taxonomy_term_hierarchy WHERE taxonomy_term_data.tid = taxonomy_term_hierarchy.tid and parent= order by taxonomy_term_data.weight

Filename: /home/vicascom/public_html/models/categorias_modelo.php

Line Number: 34