how can i insert into a row if the pair does not exist?
* NOTE these are not primary keys, my primary KEY is set to auto increment
tried insert ignore but did not work
INSERT IGNORE INTO mytable (`myid`, `theirid`) VALUES ('5', '1')
ON DUPLICATE KEY <DO NOTHING>
table looks like:
CREATE TABLE `mytable` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`myid` bigint(20) NOT NULL,
`theirid` bigint(20) NOT NULL,
`activated` tinyint(1) NOT NULL DEFAULT '0',
`dateStamp` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=latin1$$