This is what my table looks like:
CREATE TABLE `mail` (
`mail_id` int(11) NOT NULL auto_increment,
`mail_read` int(11) NOT NULL default '0',
`mail_from` int(11) NOT NULL default '0',
`mail_to` int(11) NOT NULL default '0',
`mail_time` int(11) NOT NULL default '0',
`mail_subject` varchar(255) NOT NULL default '',
`mail_text` text NOT NULL,
PRIMARY KEY (`mail_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
This is what my database insert looks like:
$db->query("INSERT INTO mail VALUES ('','0','Owner ID',{$i},unix_timestamp(),'Subject','Message')");
}
Mine works perfectly for me. After reading Kyles post since I didn't sift through all of your code he is of course right about your error. Happy New Years.