Link to home
Start Free TrialLog in
Avatar of mattibutt
mattibuttFlag for United States of America

asked on

mysql join

hi
i want to join two tables together currently i am selecting from the code table

SELECT userip, datef, quiz, username, sum(category) as category, count(qid) as qid FROM codes group by quiz,username ORDER BY category
but i also wants to select fields from the enterused table where code and enterused table quiz value is the same
CREATE TABLE `enterused` (
  `id` int(10) NOT NULL auto_increment,
  `randomcode` varchar(100) NOT NULL,
  `category` varchar(50) NOT NULL,
  `quiz` varchar(100) NOT NULL,
  `datef` varchar(30) default NULL,
  `type` int(10) default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=21 DEFAULT CHARSET=latin1 AUTO_INCREMENT=21 ;
ASKER CERTIFIED SOLUTION
Avatar of Kevin Cross
Kevin Cross
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mattibutt

ASKER

thanks buddy its good to hear from you after a while i did manage to do it