Quantcast
Channel: MySQL Forums - MySQL Workbench
Viewing all articles
Browse latest Browse all 3739

Another What's wrong with this query (no replies)

$
0
0
$mresult = mysql_query ("select * from mates m, contact c // id, name, died, misc & id, add,ph,email,misc
where m.id = c.id
and m.passed <> 1 // not dead
and c.misc = 'returned' // smail returned
or (c.address = '' and c.phone = '' and c.email = '') // address,phone,email all blank
;")

I'm looking for classmates that we can't find. If I take out either of the last 2 lines I get what I want for what's left. If I run the query as is I get the product of the 2 tables. Or maybe I'm having a senior moment .... :-/

Thanks

Viewing all articles
Browse latest Browse all 3739

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>