SELECT * FROM curso,documentos where documentos.id_curso like curso.id_curso and curso.id_cat=1 order by documentos.id_doc Asc