Good thought, but I ran the SELECT by itself:
SELECT teachers.maxID, tempaddresses.campaignID, tempaddresses.kickbacktypeID, NOW()
FROM teachers, tempaddresses
WHERE teachers.Emailaddress = tempaddresses.Emailaddress
And it returns 3 rows from this query, and the tempaddresses has 3 records in it.
But when I run the entire query, my kickback table ends up with 6 records (records 1,2,3 then the same as 4,5,6 - in the same order as well).
I checked the teachers table, and it only has one instance of each of the 3 records as well.
if it may somehow effect this, here are the 2 queries that follow this one.
$sql = "INSERT INTO campaign_event (maxID, campaignID, ceDate)";
$sql .= " SELECT teachers.maxID, tempaddresses.campaignID, NOW()
FROM teachers, tempaddresses";
$sql .= " WHERE teachers.Emailaddress = tempaddresses.Emailaddress";
and...
$sql = "UPDATE teachers JOIN tempaddresses";
$sql .= " ON teachers.Emailaddress = tempaddresses.Emailaddress";
$sql .= " SET teachers.Modified = NOW()";
Thoughts?
Thanks,
Don