Forum Moderators: open
something like
$add_history = "INSERT INTO wow_history SELECT * FROM wow WHERE id = $id"; ";
mysql_query($add_history);Before updating the table with new edits
so i have wow and wow_history table identical except that in wow_history the id is not auto incremented (if auto incremented then ONLY THE ORIGINAL data copied stored in wow_history, but rest of the successive edits are lost)
But now it says in wow_history that index not defined! So what should i do? Should i leave the wow_history without an index?
The table i use is
CREATE TABLE `wow_history` (
`id` int(11) unsigned default NULL,
`contributed_by` text,
`title` tinytext,
`content` text,
`date` bigint(20) NOT NULL default '0',
`mood` int(2) NOT NULL default '0',
`tags` text,
`trusted` tinyint(1) NOT NULL default '0',
`modified` tinyint(1) NOT NULL default '0',
`ip` varchar(80) NOT NULL default ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1; I tried making uid (another field as autoincremented index but then data of wow is not copied to wow_history)