Ver original$resultado=mysql_query("select * from tabla1,tabla2 where tabla1.iddocumento=tabla2.iddocumentotabla2");