I figure I can just show you this and ask the question. Here is a query I have used successfully:
/ insert new records /
insert into vbuser (
usergroupid, username, password, passworddate, email, usertitle, joindate, daysprune, lastvisit, lastactivity, reputation, reputationlevelid, options, salt
)
SELECT
2, a.username, md5(CONCAT(a.passwordmd5, a.id,'initialImportSalt')), curdate(), a.email, 'Junior Member', curdate(), -1, UNIX_TIMESTAMP(NOW()), UNIX_TIMESTAMP(NOW()), 10, 5, 45108311, concat(a.id,'initialImportSalt')
FROM addr_contacts a LEFT JOIN vbuser b ON a.username=b.username WHERE b.username IS NULL;
note that I'm adding records into one table - vbuser
BUT - is it possible to insert records into two or more tables at the same time? e.g.
vbuser(field1, field2, field3), vbuserdata(field4, field5,field6)
reason is, the records between the two tables would be a one-to-one relationship. Thanks for your help