Ver Mensaje Individual
  #1 (permalink)  
Antiguo 30/09/2010, 16:19
Avatar de hawaiian050
hawaiian050
 
Fecha de Ingreso: junio-2007
Mensajes: 285
Antigüedad: 17 años, 6 meses
Puntos: 2
Pregunta Error MySQL Duplicate entry '' (AYUDA)

Hola tengo un error mysql que no logro definir que es alguien tiene una idea ?

error : Duplicate entry ''

Código PHP:

$sql 
"INSERT INTO video (title, embed_code, adddate, record_date, addtime, keyword, active, thumb, thumbs) VALUES ('".$title."', '".$video_embed."', '".time()."', '".time()."', '".time()."', '', '1', '', '')";
        
                
$query mysql_query($sql) or die(mysql_error().' : '.$sql); 
Código:
-- 
-- Estructura de tabla para la tabla `video`
-- 

CREATE TABLE `video` (
  `VID` bigint(20) NOT NULL auto_increment,
  `UID` bigint(20) NOT NULL default '0',
  `title` varchar(120) NOT NULL default '',
  `description` text NOT NULL,
  `featuredesc` text NOT NULL,
  `keyword` text NOT NULL,
  `channel` varchar(255) NOT NULL default '0|',
  `vdoname` varchar(40) NOT NULL default '',
  `flvdoname` varchar(40) default NULL,
  `duration` float NOT NULL default '0',
  `space` bigint(20) NOT NULL default '0',
  `type` varchar(7) NOT NULL default '',
  `addtime` varchar(20) default NULL,
  `adddate` date NOT NULL default '0000-00-00',
  `record_date` date NOT NULL default '0000-00-00',
  `location` text NOT NULL,
  `country` varchar(120) NOT NULL default '',
  `vkey` varchar(20) NOT NULL default '',
  `viewnumber` bigint(10) NOT NULL default '0',
  `viewtime` datetime NOT NULL default '0000-00-00 00:00:00',
  `com_num` int(8) NOT NULL default '0',
  `fav_num` int(8) NOT NULL default '0',
  `download_num` bigint(20) NOT NULL default '0',
  `featured` varchar(3) NOT NULL default 'no',
  `ratedby` bigint(10) NOT NULL default '0',
  `rate` float NOT NULL default '0',
  `filehome` varchar(120) NOT NULL default '',
  `be_comment` varchar(3) NOT NULL default 'yes',
  `be_rated` varchar(3) NOT NULL default 'yes',
  `embed` varchar(8) NOT NULL default 'enabled',
  `embed_code` text NOT NULL,
  `thumb` tinyint(1) unsigned NOT NULL default '1',
  `thumbs` tinyint(2) unsigned NOT NULL default '20',
  `voter_id` varchar(200) NOT NULL default '',
  `server` varchar(255) NOT NULL default '',
  `active` char(1) NOT NULL default '',
  PRIMARY KEY  (`VID`),
  UNIQUE KEY `vkey` (`vkey`),
  KEY `viewnumber` (`viewnumber`),
  KEY `rate` (`rate`),
  KEY `fav_num` (`fav_num`),
  KEY `active` (`active`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;

-- 
-- Volcar la base de datos para la tabla `video`
-- 

INSERT INTO `video` VALUES (1, 0, 'Latina bitch fucked good part1', '', '', '', '0|', '', NULL, 0, 0, '', '1285882478', '0000-00-00', '0000-00-00', '', '', '', 0, '0000-00-00 00:00:00', 0, 0, 0, 'no', 0, 0, '', 'yes', 'yes', 'enabled', '<object width="510" height="400" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" ><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><param name="allowScriptAccess" value="always" /><param name="movie" value="http://static.xvideos.com/swf/flv_player_site_v4.swf" /><param name="allowFullScreen" value="true" /><param name="flashvars" value="id_video=633150" /><embed src="http://static.xvideos.com/swf/flv_player_site_v4.swf" allowscriptaccess="always" width="510" height="400" menu="false" quality="high" bgcolor="#000000" allowfullscreen="true" flashvars="id_video=633150" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>', 0, 0, '', '', '1');
Saudos y desde ya muchas geacias a todos .