Help for this page

Select Code to Download


  1. or download this
    CREATE TABLE `responses` ( `respondent` smallint(5) unsigned NOT NULL 
    +default '0', `response` smallint(5) unsigned NOT NULL default '0', PR
    +IMARY KEY (`respondent`,`response`), KEY `respondent` (`respondent`),
    + KEY `response` (`response`) ) TYPE=MyISAM
    
  2. or download this
    SELECT COUNT(*) FROM theTable A JOIN theTable B ON (A.respondent = B.r
    +espondent) WHERE A.response = ? AND B.response = ?