markmuir Posted September 20, 2006 Share Posted September 20, 2006 Major problem here!! I have got two tables within my database called "registration" and "activity". Within both tables is a field called MemNo. What I'm wanting to do is query the registration table for a certain town and a certain day that I type in. I then want display the users Name, Address and MemNo from the Registration table but I want to leave out users that have already completed an activity.Hope everyone understands my explanation.Thanks Link to comment https://forums.phpfreaks.com/topic/21413-searching/ Share on other sites More sharing options...
craygo Posted September 20, 2006 Share Posted September 20, 2006 try this[code]SELECT * FROM registration LEFT JOIN activity ON registration.MemNo = activity.MemNo WHERE activity.MemNo IS NULL[/code]Ray Link to comment https://forums.phpfreaks.com/topic/21413-searching/#findComment-95450 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.