Visa ett inlägg
Oläst 2005-09-29, 21:58 #1
vco-systemss avatar
vco-systems vco-systems är inte uppkopplad
Mycket flitig postare
 
Reg.datum: Dec 2004
Inlägg: 774
vco-systems vco-systems är inte uppkopplad
Mycket flitig postare
vco-systemss avatar
 
Reg.datum: Dec 2004
Inlägg: 774
Jag har följande kodsnutt i en sökfunktion.
Hur kan jag fixa så att jag varje "page_id" bara finns en gång i resultatet?

Kod:
SELECT nuke_paged_content.page_id AS page_id, nuke_paged_content.subtitle AS subtitle, nuke_paged_content.text AS text, nuke_paged_titles.title AS title, nuke_paged_titles.ingress AS ingress, nuke_paged_titles.topic_id AS topic_id
FROM nuke_paged_content
LEFT JOIN nuke_paged_titles ON ( nuke_paged_content.page_id = nuke_paged_titles.page_id ) 
WHERE (
nuke_paged_content.subtitle
LIKE "%sökord%" OR nuke_paged_titles.title
LIKE "%sökord%" OR nuke_paged_titles.ingress
LIKE "%sökord%" OR nuke_paged_content.text
LIKE "%sökord%"
)
Finns det något enkelt sätt eller måste jag "parsa" resultatet i efterhand?
vco-systems är inte uppkopplad   Svara med citatSvara med citat