Ciao, ho questa tabella di una newsletter:
CREATE TABLE `newsletterdb` (
`idm` int(11) NOT NULL auto_increment,
`email` varchar(128) NOT NULL default '',
`paese` int(2) NOT NULL default '0',
`tipo` int(2) NOT NULL default '0',
`ln` int(1) NOT NULL default '0',
`inviato` int(1) NOT NULL default '0',
PRIMARY KEY (`idm`)
) TYPE=MyISAM AUTO_INCREMENT=1 ;
devo selezionare i destinatari a gruppi in base al paese e al tipo ed ho fatto questa query che non mi dà errori ma non restituisce nulla:
$q_ml = "SELECT idm, email, ln FROM newsletterdb WHERE (paese='1' and tipo='1') and (paese='2' and tipo='1')" or die(mysql_error());
è fantascienza o potrebbe funzionare?