Visa ett inlägg
Oläst 2005-09-30, 00:16 #5
chrizzs avatar
chrizz chrizz är inte uppkopplad
Medlem
 
Reg.datum: Aug 2004
Inlägg: 296
chrizz chrizz är inte uppkopplad
Medlem
chrizzs avatar
 
Reg.datum: Aug 2004
Inlägg: 296
SELECT DISTINCT nuke_paged_content.page_id AS page_id .... fungerar nog lika bra som GROUP BY, men jag hade kört GROUP BY ändå.

Mao:

Kod:
SELECT DISTINCT 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%"
)
ger samma som:


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%"
GROUP BY page_id
)
säger jag utan att ha provat =)
chrizz är inte uppkopplad   Svara med citatSvara med citat