SMF Ads Support Forum

Support => Ad Support => Topic started by: smithy on April 25, 2007, 05:33:15 AM

Title: Unknown column 'CATEGORY' in 'field list'
Post by: smithy on April 25, 2007, 05:33:15 AM
Hello,
I have just installed the Ad mod for smf forum version 1.1.2. I had to install the mod manualy with a little help from a couple of the guys from smf because for some reason the server wont allow me to install mods from the admin panel. Everything seems to be working fine and i can ad, edit and do the other things from within the admin panel. However. As soon as click save or i should say "Ad," i get this error message

Unknown column 'CATEGORY' in 'field list'
File: /home/username/domains/mydomain.net/public_html/Sources/Ads.php
Line: 190


I have searched this forum for answers and found 2 possibilities.
1 Reupload the Ads.php file to the sourceses directory but still doesnt work
2 Something maybe missing from the database. If it is the CATEGORY table, please tell me the code i must put to ad it into the database.

Here is the database that come with the ad mods install.php

--
-- Table structure for table `smf_ads`
--

CREATE TABLE `smf_ads` (
  `ADS_ID` mediumint(8) unsigned NOT NULL auto_increment,
  `NAME` tinytext NOT NULL,
  `CONTENT` text NOT NULL,
  `BOARDS` tinytext,
  `POSTS` tinytext,
  `HITS` mediumint(8) NOT NULL default '0',
  `TYPE` smallint(4) NOT NULL default '0',
  `show_index` smallint(4) NOT NULL default '0',
  `show_board` smallint(4) NOT NULL default '0',
  `show_threadindex` smallint(4) NOT NULL default '0',
  `show_lastpost` smallint(4) NOT NULL default '0',
  `show_thread` smallint(4) NOT NULL default '0',
  `show_bottom` smallint(4) NOT NULL default '0',
  `show_welcome` smallint(4) NOT NULL default '0',
  `show_topofpage` smallint(4) NOT NULL default '0',
  `show_towerright` smallint(4) NOT NULL default '0',
  `show_towerleft` smallint(4) NOT NULL default '0',
  `show_betweencategories` smallint(4) NOT NULL default '0',
  `show_underchildren` smallint(4) NOT NULL default '0',
  PRIMARY KEY  (`ADS_ID`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ;

--
-- Dumping data for table `smf_ads`
--

INSERT INTO `smf_ads` VALUES (4, 'test', 'test', NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `smf_ads` VALUES (3, 'Test', 'Fuck', NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `smf_ads` VALUES (5, 'Fuck You', 'OMG It Worked', NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `smf_ads` VALUES (6, 'TESTING', 'JUST TESTING', NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);

-- --------------------------------------------------------

--
-- Table structure for table `smf_ads_settings`
--

CREATE TABLE `smf_ads_settings` (
  `variable` tinytext NOT NULL,
  `value` text NOT NULL,
  PRIMARY KEY  (`variable`(30))
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `smf_ads_settings`
--


Please help as i realy need this mod to work.

Thanks
smithy

EDIT:
Sorry but i have put this in the wrong place. Please move.
Thanks
Title: Re: Unknown column 'CATEGORY' in 'field list'
Post by: bigguy on April 26, 2007, 08:58:48 AM
I will leave this for Jerm to see.
Title: Re: Unknown column 'CATEGORY' in 'field list'
Post by: smithy on April 26, 2007, 11:38:38 AM
ok thanks. I have seen the ad mod on other forums and its exctly what i am looking for.

cheers
smithy
Title: Re: Unknown column 'CATEGORY' in 'field list'
Post by: smithy on April 26, 2007, 12:55:50 PM
Hello,
I got it workinging :) I had to ad the category into the list like this.

  `ADS_ID` mediumint(8) unsigned NOT NULL auto_increment,
  `NAME` tinytext NOT NULL,
  `CONTENT` text NOT NULL,
  `BOARDS` tinytext,
  `POSTS` tinytext,

  `CATEGORY` tinytext,[/b]

Is it also possible for mod makers to ad a SQL.txt file to make the manual install of mods much easier for newbies like me.

Thanks
smithy
Title: Re: Unknown column 'CATEGORY' in 'field list'
Post by: bigguy on April 27, 2007, 07:25:15 AM
Glad to hear its fixed. So you added that through phpmyadmin. ???
Title: Re: Unknown column 'CATEGORY' in 'field list'
Post by: Shen on May 01, 2007, 11:38:42 AM
Had the same problem.

Thanks for this hint.
Title: Re: Unknown column 'CATEGORY' in 'field list'
Post by: smithy on May 02, 2007, 05:52:24 PM
Quote from: bigguy on April 27, 2007, 07:25:15 AM
Glad to hear its fixed. So you added that through phpmyadmin. ???
Yes, because the tables wouldnt install when i tried installing them from the browser.

smithy

Title: Re: Unknown column 'CATEGORY' in 'field list'
Post by: bigguy on May 02, 2007, 06:50:00 PM
Thanks for the info, I am sure someone will find this useful. ;)