Database kald Men join og flere values
HejHåber der er nogen der har en ide til hvad fejlen er:
Fejl i udførsel af forespørgsel
Fejlkode: 524
Fejltekst: error (rejected)
Det ser ud til, at forbindelsen til serveren er tabt. Check netværksforbindelse, og server status.
Min kode:
SELECT DISTINCT Posts.ID, PostMeta.post_id as PostMetaPostId, Posts.post_parent as PostParent_value, Posts.post_type,
attribute_pa_hoejde.meta_key as attribute_pa_tween_stoerrelse, attribute_pa_hoejde.meta_value as attribute_pa_hoejde_value,
attribute_pa_tween_stoerrelse.meta_key as attribute_pa_tween_stoerrelse, attribute_pa_tween_stoerrelse.meta_value as attribute_pa_tween_stoerrelse_value,
attribute_pa_aar.meta_key as attribute_pa_aar, attribute_pa_aar.meta_value as attribute_pa_aar_value,
attribute_pa_voksen_stoerrelse.meta_key as attribute_pa_voksen_stoerrelse, attribute_pa_voksen_stoerrelse.meta_value as attribute_pa_voksen_stoerrelse_value,
attribute_pa_bukse_waist.meta_key as attribute_pa_bukse_waist, attribute_pa_bukse_waist.meta_value as attribute_pa_bukse_waist_value,
attribute_pa_bukser_laengde.meta_key as attribute_pa_bukser_laengde, attribute_pa_bukser_laengde.meta_value as attribute_pa_bukser_laengde_value,
attribute_pa_sko_stoerrelse.meta_key as attribute_pa_sko_stoerrelse, attribute_pa_sko_stoerrelse.meta_value as attribute_pa_sko_stoerrelse_value,
attribute_pa_stroemper_str.meta_key as attribute_pa_stroemper_str, attribute_pa_stroemper_str.meta_value as attribute_pa_stroemper_str_value,
attribute_pa_bh_stoerrelse.meta_key as attribute_pa_bh_stoerrelse, attribute_pa_bh_stoerrelse.meta_value as attribute_pa_bh_stoerrelse_value,
attribute_pa_bh_skaal_stoerrelse.meta_key as attribute_pa_bh_skaal_stoerrelse, attribute_pa_bh_skaal_stoerrelse.meta_value as attribute_pa_bh_skaal_stoerrelse_value,
attribute_pa_baelte_laengde.meta_key as attribute_pa_baelte_laengde, attribute_pa_baelte_laengde.meta_value as attribute_pa_baelte_laengde_value,
attribute_pa_leverandoer_stoerrelse.meta_key as attribute_pa_leverandoer_stoerrelse, attribute_pa_leverandoer_stoerrelse.meta_value as attribute_pa_leverandoer_stoerrelse_value
FROM nw_postmeta
INNER JOIN nw_posts as Posts ON post_id = Posts.ID
LEFT JOIN nw_postmeta as PostMeta ON ID = PostMeta.post_id
LEFT JOIN nw_postmeta as attribute_pa_hoejde ON ID = attribute_pa_hoejde.post_id
LEFT JOIN nw_postmeta as attribute_pa_tween_stoerrelse ON ID = attribute_pa_tween_stoerrelse.post_id
LEFT JOIN nw_postmeta as attribute_pa_aar ON ID = attribute_pa_aar.post_id
LEFT JOIN nw_postmeta as attribute_pa_voksen_stoerrelse ON ID = attribute_pa_voksen_stoerrelse.post_id
LEFT JOIN nw_postmeta as attribute_pa_bukse_waist ON ID = attribute_pa_bukse_waist.post_id
LEFT JOIN nw_postmeta as attribute_pa_bukser_laengde ON ID = attribute_pa_bukser_laengde.post_id
LEFT JOIN nw_postmeta as attribute_pa_sko_stoerrelse ON ID = attribute_pa_sko_stoerrelse.post_id
LEFT JOIN nw_postmeta as attribute_pa_stroemper_str ON ID = attribute_pa_stroemper_str.post_id
LEFT JOIN nw_postmeta as attribute_pa_bh_stoerrelse ON ID = attribute_pa_bh_stoerrelse.post_id
LEFT JOIN nw_postmeta as attribute_pa_bh_skaal_stoerrelse ON ID = attribute_pa_bh_skaal_stoerrelse.post_id
LEFT JOIN nw_postmeta as attribute_pa_baelte_laengde ON ID = attribute_pa_baelte_laengde.post_id
LEFT JOIN nw_postmeta as attribute_pa_leverandoer_stoerrelse ON ID = attribute_pa_leverandoer_stoerrelse.post_id
WHERE attribute_pa_hoejde.meta_key = 'attribute_pa_hoejde' AND
attribute_pa_tween_stoerrelse.meta_key = 'attribute_pa_tween-stoerrelse' AND
attribute_pa_aar.meta_key = 'attribute_pa_aar' AND
attribute_pa_voksen_stoerrelse.meta_key = 'attribute_pa_voksen-stoerrelse' AND
attribute_pa_bukse_waist.meta_key = 'attribute_pa_bukse-waist' AND
attribute_pa_bukser_laengde.meta_key = 'attribute_pa_bukser-laengde' AND
attribute_pa_sko_stoerrelse.meta_key = 'attribute_pa_sko-stoerrelse' AND
attribute_pa_stroemper_str.meta_key = 'attribute_pa_stroemper-str' AND
attribute_pa_bh_stoerrelse.meta_key = 'attribute_pa_bh-stoerrelse' AND
attribute_pa_bh_skaal_stoerrelse.meta_key = 'attribute_pa_bh-skaal-stoerrelse' AND
attribute_pa_baelte_laengde.meta_key = 'attribute_pa_baelte-laengde' AND
attribute_pa_leverandoer_stoerrelse.meta_key = 'attribute_pa_leverandoer-stoerrelse' AND
Posts.ID = (243, 244, 245, 246, 247)
Jeg tester den i phpmyadmin
Når jeg tager en value virker det fint men med flere siger den fejlen der.
Håber i ved eller jeg prøve.
Med venlig hilsen
Morten