phpbar.de logo

Mailinglisten-Archive

Ergebnisse bekommen, auch wenn teilweise nichts drinnen ist

Ergebnisse bekommen, auch wenn teilweise nichts drinnen ist

Grobmeier, Christian mysql-de_(at)_lists.bttr.org
Thu, 18 Jul 2002 17:26:15 +0200


This is a multi-part message in MIME format.
Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C22E6F.74B6F4B0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hallo Leute,
ich habe eine kleine Frage:
nachfolgend seht ihr mal mein SQL Statement, das super funkt,
aber nur ein Problem hat. N=E4mlich, wenn in einer Tabelle
mal nichts drinsteht, z.b. keine Links zu dem Thema vorhanden sind,
dann liefert das Statement gar nichts.=20
Ich w=FCrde es aber gerne so einrichten, das es mir alles liefert=20
was es findet.
Ist das m=F6glich?=20
Vielen Dank schon mal im vorraus!

Chris


SELECT poss_members.visible_name 		AS author,
	 poss_artist.name 			AS artist,=20
	 poss_releases.title 			AS articlename,=20
 	 poss_reviews.date_submit 		AS dateOfWriting,=20
	 poss_categories.species 		AS style,=20
	 poss_reviews.points_music 		AS pointsMusic,=20
	 poss_reviews.points_lyrics 		AS pointsLyrics,=20
	 poss_reviews.points_sound 		AS pointsSound,=20
	 poss_reviews.text 			AS review,=20
	 poss_contactperson.name 		AS contactName,=20
	 poss_contactperson.firstname 	AS contactFirstName,=20
	 poss_contactperson.street 		AS contactStreet,=20
	 poss_contactperson.zip 		AS contactZip,=20
	 poss_contactperson.city 		AS contactCity,=20
	 poss_contactperson.email 		AS contactEmail,=20
	 poss_contactperson.phone 		AS contactPhone,=20
	 poss_contactperson.mobile 		AS contactMobile,=20
	 poss_contactperson.fax 		AS contactFax,=20
	 poss_label.name 				AS labelName,=20
	 poss_label.id 				AS labelID,=20
	 poss_links.id 				AS linkID,=20
	 poss_links.title 			AS linkTitle=20
FROM 	poss_categories,=20
	poss_reviews,=20
	poss_releases,=20
	poss_artist,=20
	poss_members,=20
	poss_contactperson,=20
	poss_label,=20
	poss_links=20
WHERE poss_reviews.id_member =3D poss_members.id=20
  AND poss_reviews.id_releases =3D poss_releases.id=20
  AND poss_releases.id_artist =3D poss_artist.id=20
  AND poss_reviews.id_categories =3D poss_categories.id=20
  AND poss_artist.id_contactperson =3D poss_contactperson.id=20
  AND poss_releases.id_label =3D poss_label.id=20
  AND poss_artist.id_links =3D poss_links.id=20
  AND poss_reviews.id =3D '1'=20

------_=_NextPart_001_01C22E6F.74B6F4B0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">=0D
<HTML>=0D
<HEAD>=0D
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; charset=3Diso-8859-=
1">=0D
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version 5.5.2653.12"=
>=0D
<TITLE>Ergebnisse bekommen, auch wenn teilweise nichts drinnen ist</TITLE>=
=0D
</HEAD>=0D
<BODY>=0D
=0D
<P><FONT SIZE=3D2>Hallo Leute,</FONT>=0D
<BR><FONT SIZE=3D2>ich habe eine kleine Frage:</FONT>=0D
<BR><FONT SIZE=3D2>nachfolgend seht ihr mal mein SQL Statement, das super f=
unkt,</FONT>=0D
<BR><FONT SIZE=3D2>aber nur ein Problem hat. N=E4mlich, wenn in einer Tabel=
le</FONT>=0D
<BR><FONT SIZE=3D2>mal nichts drinsteht, z.b. keine Links zu dem Thema vorh=
anden sind,</FONT>=0D
<BR><FONT SIZE=3D2>dann liefert das Statement gar nichts. </FONT>=0D
<BR><FONT SIZE=3D2>Ich w=FCrde es aber gerne so einrichten, das es mir alle=
s liefert </FONT>=0D
<BR><FONT SIZE=3D2>was es findet.</FONT>=0D
<BR><FONT SIZE=3D2>Ist das m=F6glich? </FONT>=0D
<BR><FONT SIZE=3D2>Vielen Dank schon mal im vorraus!</FONT>=0D
</P>=0D
=0D
<P><FONT SIZE=3D2>Chris</FONT>=0D
</P>=0D
<BR>=0D
=0D
<P><FONT SIZE=3D2>SELECT poss_members.visible_name &nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AS author,</FONT>=
=0D
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT SIZE=3D2> poss_ar=
tist.name &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AS artist, </FONT>=0D
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT SIZE=3D2> poss_re=
leases.title &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AS articlename, </FONT>=0D
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; poss_re=
views.date_submit &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp; AS dateOfWriting, </FONT>=0D
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT SIZE=3D2> poss_ca=
tegories.species &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp; AS style, </FONT>=0D
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT SIZE=3D2> poss_re=
views.points_music &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp; AS pointsMusic, </FONT>=0D
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT SIZE=3D2> poss_re=
views.points_lyrics &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp; AS pointsLyrics, </FONT>=0D
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT SIZE=3D2> poss_re=
views.points_sound &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp; AS pointsSound, </FONT>=0D
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT SIZE=3D2> poss_re=
views.text &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AS review, </FONT>=0D
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT SIZE=3D2> poss_co=
ntactperson.name &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp; AS contactName, </FONT>=0D
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT SIZE=3D2> poss_co=
ntactperson.firstname &nbsp; AS contactFirstName, </FONT>=0D
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT SIZE=3D2> poss_co=
ntactperson.street &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp; AS contactStreet, </FONT>=0D
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT SIZE=3D2> poss_co=
ntactperson.zip &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp; AS contactZip, </FONT>=0D
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT SIZE=3D2> poss_co=
ntactperson.city &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp; AS contactCity, </FONT>=0D
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT SIZE=3D2> poss_co=
ntactperson.email &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp; AS contactEmail, </FONT>=0D
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT SIZE=3D2> poss_co=
ntactperson.phone &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp; AS contactPhone, </FONT>=0D
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT SIZE=3D2> poss_co=
ntactperson.mobile &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp; AS contactMobile, </FONT>=0D
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT SIZE=3D2> poss_co=
ntactperson.fax &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp; AS contactFax, </FONT>=0D
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT SIZE=3D2> poss_la=
bel.name &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp; AS labelName, </FONT>=0D
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT SIZE=3D2> poss_la=
bel.id&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AS label=
ID, </FONT>=0D
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT SIZE=3D2> poss_li=
nks.id&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AS linkI=
D, </FONT>=0D
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT SIZE=3D2> poss_li=
nks.title &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AS linkTitle </FONT>=0D
<BR><FONT SIZE=3D2>FROM &nbsp;&nbsp; poss_categories, </FONT>=0D
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>poss_reviews,=
 </FONT>=0D
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>poss_releases=
, </FONT>=0D
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>poss_artist, =
</FONT>=0D
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>poss_members,=
 </FONT>=0D
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>poss_contactp=
erson, </FONT>=0D
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>poss_label, <=
/FONT>=0D
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>poss_links </=
FONT>=0D
<BR><FONT SIZE=3D2>WHERE poss_reviews.id_member =3D poss_members.id </FONT>=
=0D
<BR><FONT SIZE=3D2>&nbsp; AND poss_reviews.id_releases =3D poss_releases.id=
 </FONT>=0D
<BR><FONT SIZE=3D2>&nbsp; AND poss_releases.id_artist =3D poss_artist.id </=
FONT>=0D
<BR><FONT SIZE=3D2>&nbsp; AND poss_reviews.id_categories =3D poss_categorie=
s.id </FONT>=0D
<BR><FONT SIZE=3D2>&nbsp; AND poss_artist.id_contactperson =3D poss_contact=
person.id </FONT>=0D
<BR><FONT SIZE=3D2>&nbsp; AND poss_releases.id_label =3D poss_label.id </FO=
NT>=0D
<BR><FONT SIZE=3D2>&nbsp; AND poss_artist.id_links =3D poss_links.id </FONT=
>=0D
<BR><FONT SIZE=3D2>&nbsp; AND poss_reviews.id =3D '1' </FONT>=0D
</P>=0D
=0D
</BODY>=0D
</HTML>=0D

------_=_NextPart_001_01C22E6F.74B6F4B0--

---
Infos zur Mailingliste, zur Teilnahme und zum An- und Abmelden unter
-->>  http://www.4t2.com/mysql 



php::bar PHP Wiki   -   Listenarchive