phpbar.de logo

Mailinglisten-Archive

[php] AW: [php] AW: [php] AW: [php] SELECT optimieren??? (eventuell OT)

[php] AW: [php] AW: [php] AW: [php] SELECT optimieren??? (eventuell OT)

Daniel Rowe daniel.rowe_(at)_prosales-europe.com
Wed, 7 Mar 2001 15:24:12 +0100


> > SELECT artist.id, artist.name, audio.id, audio.user_id,
audio.artist_id,
> > audio.title, audio.format, audio.genre, audio.year, audio.label,
> > audio.length, format.*, genre.* FROM artist, audio, format, genre
WHERE
> > audio.artist_id = artist.id AND artist.name LIKE '%accessory%' AND
> > audio.format = format.id AND audio.genre = genre.id ORDER BY
artist.name
> > ASC, audio.year DESC

Gehört eigentlich zu den SQL-Basics. So in der Art:

select artist.*, audio.*, format.*, genre.*
FROM artist 
	LEFT OUTER JOIN audio on audio.id = artist.audio_id
	LEFT OUTER JOIN format ON format.id = audio.format ...

Gruß


Daniel
---
Daniel Rowe
daniel.rowe_(at)_prosales-europe.com
ProSales Europe Media GmbH

Katharinenstrasse 19 · 10711 Berlin
Telefon [+49 30] 726 15 91 - 20
Telefax |+49 30] 726 15 91 - 49


php::bar PHP Wiki   -   Listenarchive