SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Wizard Wolf_22's Avatar
    Join Date
    Jul 2005
    Posts
    1,700
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Anyone see anything wrong with this insert?

    I'm having some problems with the following insert (it comes back saying the column doesn't match the value count):
    Code:
    INSERT INTO `downloads_files` VALUES (1, 0, '', '', 0, 'example.pdf', 1, 1, 2, 0, '', '75.05 Kb', 'pdf', 'Example', '', '', 1, '', 0, 0, '', 38, '', 'pdf2.gif', 0, 2, 3, '', 0, '', 0, '0000-00-00', '0000-00-00', 0, 0, '', '', '', '', '', '0000-00-00', '', '', '', '', '', '', '2008-09-23', '', '', 0, 1, 0, 0, 0, '', '', '', 0, '0000-00-00 00:00:00', 0, 62, '2008-09-23 13:10:39');
    I wasn't able to see anything wrong with it and it's making me worry that there's some sort of weird encoding issue at work here...

    The following are the columns to this:
    Code:
    CREATE TABLE `downloads_files` (
      `id` int(11) NOT NULL auto_increment,
      `sequence` int(11) NOT NULL default '0',
      `windowtitle` varchar(255) collate latin1_german2_ci NOT NULL default '',
      `keywords` varchar(255) collate latin1_german2_ci NOT NULL default '',
      `metatype` smallint(6) NOT NULL default '0',
      `realname` varchar(255) collate latin1_german2_ci NOT NULL default '',
      `realwithid` tinyint(3) unsigned NOT NULL default '0',
      `islocal` tinyint(3) unsigned NOT NULL default '1',
      `containerid` smallint(6) NOT NULL default '0',
      `userid` int(11) NOT NULL default '0',
      `filepath` varchar(255) collate latin1_german2_ci NOT NULL default '',
      `filesize` varchar(255) collate latin1_german2_ci NOT NULL default '',
      `filetype` varchar(255) collate latin1_german2_ci NOT NULL default '',
      `filetitle` varchar(255) collate latin1_german2_ci NOT NULL default '',
      `description` text collate latin1_german2_ci NOT NULL,
      `smalldesc` text collate latin1_german2_ci NOT NULL,
      `autoshort` tinyint(3) unsigned NOT NULL default '1',
      `license` text collate latin1_german2_ci NOT NULL,
      `licenseagree` tinyint(3) unsigned NOT NULL default '0',
      `price` int(11) NOT NULL default '0',
      `currency` char(3) collate latin1_german2_ci NOT NULL default '',
      `downloads` int(11) NOT NULL default '0',
      `url` varchar(255) collate latin1_german2_ci NOT NULL default '',
      `icon` varchar(50) collate latin1_german2_ci NOT NULL default '',
      `published` tinyint(3) unsigned NOT NULL default '1',
      `registered` tinyint(3) unsigned NOT NULL default '2',
      `userupload` tinyint(3) unsigned NOT NULL default '3',
      `download_text` text collate latin1_german2_ci NOT NULL,
      `recommended` tinyint(3) unsigned NOT NULL default '0',
      `recommend_text` text collate latin1_german2_ci NOT NULL,
      `featured` tinyint(4) NOT NULL default '0',
      `featured_st_date` date NOT NULL default '0000-00-00',
      `featured_end_date` date NOT NULL default '0000-00-00',
      `featured_priority` smallint(6) NOT NULL default '0',
      `featured_seq` smallint(6) NOT NULL default '0',
      `featured_text` text collate latin1_german2_ci NOT NULL,
      `opsystem` varchar(50) collate latin1_german2_ci NOT NULL default '',
      `legaltype` varchar(50) collate latin1_german2_ci NOT NULL default '',
      `requirements` text collate latin1_german2_ci NOT NULL,
      `company` varchar(255) collate latin1_german2_ci NOT NULL default '',
      `releasedate` date NOT NULL default '0000-00-00',
      `languages` text collate latin1_german2_ci NOT NULL,
      `company_URL` varchar(255) collate latin1_german2_ci NOT NULL default '',
      `translator` varchar(255) collate latin1_german2_ci NOT NULL default '',
      `fileversion` varchar(50) collate latin1_german2_ci NOT NULL default '',
      `fileauthor` varchar(100) collate latin1_german2_ci NOT NULL default '',
      `author_URL` varchar(255) collate latin1_german2_ci NOT NULL default '',
      `filedate` date NOT NULL default '0000-00-00',
      `filehomepage` varchar(255) collate latin1_german2_ci NOT NULL default '',
      `screenurl` varchar(255) collate latin1_german2_ci NOT NULL default '',
      `plaintext` tinyint(3) unsigned NOT NULL default '0',
      `isblob` tinyint(3) unsigned NOT NULL default '0',
      `chunkcount` int(11) NOT NULL default '0',
      `groupid` smallint(6) NOT NULL default '0',
      `editgroup` smallint(6) NOT NULL default '0',
      `custom_1` varchar(255) collate latin1_german2_ci NOT NULL default '',
      `custom_2` varchar(255) collate latin1_german2_ci NOT NULL default '',
      `custom_3` text collate latin1_german2_ci NOT NULL,
      `custom_4` int(11) NOT NULL default '0',
      `custom_5` datetime NOT NULL default '0000-00-00 00:00:00',
      `oldid` int(11) NOT NULL default '0',
      `submittedby` mediumint(9) NOT NULL default '0',
      `submitdate` datetime NOT NULL default '0000-00-00 00:00:00',
      UNIQUE KEY `id` (`id`),
      KEY `filetitle` (`filetitle`),
      KEY `url` (`url`),
      KEY `containerid` (`containerid`,`published`),
      KEY `recommended` (`containerid`,`recommended`,`published`),
      KEY `featured` (`containerid`,`featured`,`published`,`featured_st_date`,`featured_end_date`),
      KEY `opsystem` (`containerid`,`opsystem`,`published`),
      FULLTEXT KEY `words` (`filetitle`,`description`,`smalldesc`,`fileauthor`)
    ) ENGINE=MyISAM AUTO_INCREMENT=49 DEFAULT CHARSET=latin1 COLLATE=latin1_german2_ci AUTO_INCREMENT=49 ;
    I was hoping this would be a simple syntax period or comma issue...

  2. #2
    SitePoint Wizard Wolf_22's Avatar
    Join Date
    Jul 2005
    Posts
    1,700
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry guys... I found what was going on (missing a couple columns...).


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •