Am getting this error in my backend "doesn't have a default value"

I need your help, am getting the following error “Field ‘wallpaper_total_rate’ doesn’t have a default value” in my backend
see the table below

CREATE TABLE IF NOT EXISTS `wallpaper` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `cid` varchar(255) NOT NULL,
  `wallpaper_image` varchar(255) NOT NULL,
  `status` varchar(255) NOT NULL,
  `tag` varchar(255) NOT NULL,
  `size` varchar(255) NOT NULL,
  `user` varchar(11) NOT NULL,
  `download_count` int(11) NOT NULL,
  `wallpaper_total_rate` int(255) NOT NULL,
  `wallpaper_rate_avg` int(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=37 ;

please help

Where is your codes? All I see is your table structure.

Your code presumably is trying to insert a new row in the table without a value for that field. But, you’ve said that it cannot be NULL in the table definition, and you haven’t specified a default value. So you get an error when you try it.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.