Last active
August 29, 2015 14:07
-
-
Save DannyFeliz/227e4dab3e402f2a4c6f to your computer and use it in GitHub Desktop.
Retorna los valores de los cines
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT nod.title as `Titulo`, dur.field_duracion_value as `Duracion`, tx.name as `Director`, sip.field_sinopsis_value as `Sinopsis`, rep.field_reparto_value as `Reparto` , | |
vid.field_video_fid as `ID Trailer`, fly.field_movie_flyer_fid as `ID Flyter`, /*gen.field_genero_tid as `ID Genero`*/ | |
/*,sal.field_salas_cine_value as `ID Salas`,*/filem.filename as `Nombre Flyer`, filem.uri as `Path Flyer`, fil.filename as `Titulo Trailer`, fil.uri as `Path Video` | |
FROM node nod | |
JOIN field_data_field_duracion dur ON dur.entity_id = nod.nid | |
JOIN taxonomy_index ti ON ti.nid = nod.nid | |
JOIN taxonomy_term_data tx ON tx.tid = ti.tid | |
JOIN field_data_field_director dir ON tx.tid = dir.field_director_tid | |
JOIN field_data_field_sinopsis sip ON sip.entity_id = nod.nid | |
JOIN field_data_field_reparto rep ON rep.entity_id = nod.nid | |
JOIN field_data_field_video vid ON vid.entity_id = nod.nid | |
JOIN field_data_field_movie_flyer fly ON fly.entity_id = nod.nid | |
/*JOIN field_data_field_genero gen ON gen.entity_id = nod.nid (Si tiene más de un genero se repiten pero funciona) */ | |
/*JOIN field_revision_field_salas_cine sal ON sal.entity_id = nod.nid (Si se presenta en más de una sala se repite)*/ | |
JOIN file_managed filem | |
ON filem.fid = fly.field_movie_flyer_fid | |
LEFT JOIN file_managed fil On fil.fid = vid.field_video_fid | |
WHERE nod.status = 1 ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment