OK, I wasn't thinking when I designed the tables. Currently, when a record is added it contains the user ID that added it. However, if a record is deleted, so is the credit that goes to that user for adding it. I've decided to create an 'added' table that contains a record for every addition to the database.

What I want to do now is get the user ID for each record out of the 'books' table and insert it into the 'books_added' table. Can I do that with mysql? Or do I need to loop it in php instead?

Code MySQL:
CREATE TABLE `books` (
  `id` bigint(20) unsigned NOT NULL auto_increment,
  `added_uid` bigint(20) unsigned NOT NULL default '0',
  `dev_id` int(10) unsigned NOT NULL,
  `date_added` datetime NOT NULL default '0000-00-00 00:00:00',
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
 
CREATE TABLE `books_added` (
  `ad_id` bigint(20) unsigned NOT NULL auto_increment,
  `ad_book_id` bigint(20) unsigned NOT NULL,
  `ad_uid` bigint(20) unsigned NOT NULL,
  `ad_dev_id` bigint(20) unsigned NOT NULL,
  `ad_date_added` datetime NOT NULL,
  PRIMARY KEY  (`ad_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
 
SOMETHING LIKE
 
INSERT INTO books_added (ad_book_id,ad_uid,ad_dev_id,ad_date_added)
SELECT id,added_uid,dev_id,date_added
FROM books