Jump to content

Query Trouble? > Displaying every value!


-*Phoenix*-

Recommended Posts

Ok so heres my problem ive built my DB and populated it with relevant data. Now thats where the problem begins i want to list the avatar names, strangths, species, hoard, email and gender for all the active users with an email beginning with an 'a'.Right so ive written my query exactly as below and i get the active ones with emails beginning with a but it lists every single avatar and other attributes in the avatar table not just the ones belonging to the users ive searched for! Why would it do that??I cant see any problem with my code but maybe you guys can.Thanks in advance!

USE MMORPGSELECT DISTINCT u.Email, a.Avatar_Name, a.Strength, a.Hoard, a.Gender, s.Species_NameFROM RPG_User u, RPG_Avatar a, RPG_Species sWHERE u.Active = 1 AND u.Email LIKE 'a%'ORDER BY u.Email;

untitled.GIF

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...