You are here: need help writing a SQL statement « All PHP « IT news, forums, messages
need help writing a SQL statement

Posted by jj on 10/13/02 11:28

Hi,

Im hoping you could help me write a SQL statement which im having problems
with:

I have 2 tables which both have an "email" column. I want to find out if a
particular email exists in either one of these tables, so heres what i
wrote:

select customers_email_address, email from newsletter,customers where
customers_email_address='test@test.com' OR email='test@test.com';

this outputs all the rows that are in those tables for some reason.

PLease help.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация