RE: Ignoring specific values in an inner join query?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



$abfrage3="select distinct Anschriften.ID as aid, 
Anschriften.PLZ as aplz,
Anschriften.STRASSE as astrasse, Anschriften.HNR as ahnr from 
Anschriften
inner join Master on Anschriften.ID=Master.A
inner join Master as m on Master.FN=m.FN
inner join Personen on m.NN=Personen.ID
where Personen.Name like '%$name%'
AND whatever_field_you_want IS NOT NULL
AND whatever_other_field IS NOT NULL";




Gary Every
Sr. UNIX Administrator
Ingram Entertainment
(615) 287-4876
"Pay It Forward"
mailto:gary.every@ingramentertainment.com
http://accessingram.com


> -----Original Message-----
> From: Andr Sannerholt [mailto:sannerholt@freenet.de]
> Sent: Tuesday, June 10, 2003 10:42 AM
> To: php-db@lists.php.net
> Subject:  Ignoring specific values in an inner join query?
> 
> 
> Hi everybody.
> 
> How to let mysql ignore specific values in an inner join 
> query? In this case
> I want it to ignore Null-Values!
> 
> $abfrage3="select distinct Anschriften.ID as aid, 
> Anschriften.PLZ as aplz,
> Anschriften.STRASSE as astrasse, Anschriften.HNR as ahnr from 
> Anschriften
> inner join Master on Anschriften.ID=Master.A
> inner join Master as m on Master.FN=m.FN
> inner join Personen on m.NN=Personen.ID
> where Personen.Name like '%$name%'";
> 
> Regards
> 
> André
> 
> 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux