Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules
Author Message
dschulze
Client


Joined: Dec 31, 2005
Posts: 25

PostPosted: Tue Mar 09, 2010 10:07 pm Reply with quote

I have been running on rn2.30.00 for awhile and never used Advertising Module until now. I will upgrade to 2.40.01 as soon as it is released but do not want to perform 2 upgrades so I need a fix for this problem if possible.

Here is the failing insert:

Code:
March 6, 2010, 1:07 am 1136 : Column count doesn't match value count at row 1

SQL was: insert into nuke_banner values (NULL, '1', '0', '1', '0', '/********/*********', 'http://www.*********.com', 'The **********', now(), '00-00-0000 00:00:00', '0', '1')


I know I could re-code this specifying the columns, but this doesn't look like a 'good' problem (are there 'good' ones?) so I searched, didn't find any other report and am posting.

This was an upgrade from 2.02.02.

Thanks for any help!
 
View user's profile Send private message
dschulze
PostPosted: Wed Mar 10, 2010 11:46 am Reply with quote

Comparing core sql and module 2.30.00 to prod, table ddl matches, looks like Advertising module is whacked so I will re-deploy that and test.
 
fkelly
Former Moderator in Good Standing


Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY

PostPosted: Wed Mar 10, 2010 12:44 pm Reply with quote

Many of the problems you are noticing in the advertising module were fixed with RN 2.40. Take a look at:

Only registered users can see links on this board! Get registered or login!

Given that RN 2.40.01 is due out any day now, you might want to wait a bit for that and then upgrade. Last Spring and Summer (2009) we started looking at the advertising module because we were seeing some W3C compliance errors on our sites and discovered that the basics of the module were (excuse the technical term) a "mess". A number of the SQL statements, such as the one you quoted were in error.

I don't have time to go digging through the code to find a fix to individual problems such as the one you listed. If you absolutely need a fix immediately you could download the 2.40 distribution and run a file comparison utility (or just bring equivalent programs up in an editor) and copy the newer corresponding code in. However, as I say, there were a number of similar errors so you will only be fixing part of the problem.
 
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 17077

PostPosted: Wed Mar 10, 2010 1:10 pm Reply with quote

dschulze wrote:
I have been running on rn2.30.00 for awhile and never used Advertising Module until now. I will upgrade to 2.40.01 as soon as it is released but do not want to perform 2 upgrades so I need a fix for this problem if possible.

Here is the failing insert:

Code:
March 6, 2010, 1:07 am 1136 : Column count doesn't match value count at row 1

SQL was: insert into nuke_banner values (NULL, '1', '0', '1', '0', '/********/*********', 'http://www.*********.com', 'The **********', now(), '00-00-0000 00:00:00', '0', '1')


I know I could re-code this specifying the columns, but this doesn't look like a 'good' problem (are there 'good' ones?) so I searched, didn't find any other report and am posting.

This was an upgrade from 2.02.02.

Thanks for any help!


Don,

You are trying to insert 12 values and that would be correct as there are 12 columns in the table:

Code:
CREATE TABLE IF NOT EXISTS `nuke_banner` (

  `bid` int(11) NOT NULL auto_increment,
  `cid` int(11) NOT NULL default '0',
  `imptotal` int(11) NOT NULL default '0',
  `impmade` int(11) NOT NULL default '0',
  `clicks` int(11) NOT NULL default '0',
  `imageurl` varchar(100) NOT NULL default '',
  `clickurl` varchar(200) NOT NULL default '',
  `alttext` varchar(255) NOT NULL default '',
  `date` datetime default NULL,
  `dateend` datetime default NULL,
  `type` tinyint(1) NOT NULL default '0',
  `active` tinyint(1) NOT NULL default '1',
  PRIMARY KEY  (`bid`),
  KEY `cid` (`cid`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=0;


So, I would recommend getting a fresh copy of the advertising module to see if that helps. If not, please let me know.
 
View user's profile Send private message
dschulze
PostPosted: Wed Mar 10, 2010 2:04 pm Reply with quote

fkelly wrote:
Many of the problems you are noticing in the advertising module were fixed with RN 2.40. Take a look at:

Only registered users can see links on this board! Get registered or login!

Given that RN 2.40.01 is due out any day now, you might want to wait a bit for that and then upgrade. Last Spring and Summer (2009) we started looking at the advertising module because we were seeing some W3C compliance errors on our sites and discovered that the basics of the module were (excuse the technical term) a "mess". A number of the SQL statements, such as the one you quoted were in error.

I don't have time to go digging through the code to find a fix to individual problems such as the one you listed. If you absolutely need a fix immediately you could download the 2.40 distribution and run a file comparison utility (or just bring equivalent programs up in an editor) and copy the newer corresponding code in. However, as I say, there were a number of similar errors so you will only be fixing part of the problem.


Thanks for your response....I will have to wait on 2.40.01 as you state as I replaced the module code and still the same problem plus others so, just as I feared and as you are confirming, I will simply be re-inventing the 2.40.01 wheel so I might as well wait. Thanks again!
 
dschulze
PostPosted: Wed Mar 10, 2010 2:10 pm Reply with quote

Raven wrote:
dschulze wrote:
I have been running on rn2.30.00 for awhile and never used Advertising Module until now. I will upgrade to 2.40.01 as soon as it is released but do not want to perform 2 upgrades so I need a fix for this problem if possible.

Here is the failing insert:

Code:
March 6, 2010, 1:07 am 1136 : Column count doesn't match value count at row 1

SQL was: insert into nuke_banner values (NULL, '1', '0', '1', '0', '/********/*********', 'http://www.*********.com', 'The **********', now(), '00-00-0000 00:00:00', '0', '1')


I know I could re-code this specifying the columns, but this doesn't look like a 'good' problem (are there 'good' ones?) so I searched, didn't find any other report and am posting.

This was an upgrade from 2.02.02.

Thanks for any help!


Don,

You are trying to insert 12 values and that would be correct as there are 12 columns in the table:

Code:
CREATE TABLE IF NOT EXISTS `nuke_banner` (

  `bid` int(11) NOT NULL auto_increment,
  `cid` int(11) NOT NULL default '0',
  `imptotal` int(11) NOT NULL default '0',
  `impmade` int(11) NOT NULL default '0',
  `clicks` int(11) NOT NULL default '0',
  `imageurl` varchar(100) NOT NULL default '',
  `clickurl` varchar(200) NOT NULL default '',
  `alttext` varchar(255) NOT NULL default '',
  `date` datetime default NULL,
  `dateend` datetime default NULL,
  `type` tinyint(1) NOT NULL default '0',
  `active` tinyint(1) NOT NULL default '1',
  PRIMARY KEY  (`bid`),
  KEY `cid` (`cid`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=0;


So, I would recommend getting a fresh copy of the advertising module to see if that helps. If not, please let me know.


Thanks Raven....my table has 16 cols actually (not counting the auto-increment 'bid' col), which is the problem when a values only insert is accounting for only 12 of them so it looks to me like a newer table structure and older code....I replaced the entire Advertising module code set and still have the problem.

I will take fkelly's advice and just solve this with 2.40.01 as soon as it is released as I know all of you are quite busy and that makes the most sense.

I will also be donating when I download 2.40.01 as RN is worth quite a bit and deserves to be paid for....my experience has been very positive and I am thankful to all of you who make all the efforts to make it what it is!
 
fkelly
PostPosted: Wed Mar 10, 2010 2:58 pm Reply with quote

Here is the code from the sql used to load the RN database (INSTALLATION directory).

Code:
DROP TABLE IF EXISTS $prefix.`_banner`;

CREATE TABLE IF NOT EXISTS $prefix.`_banner` ( `bid` int(11) NOT NULL auto_increment, `cid` int(11) NOT NULL default '0', `name` varchar(50) NOT NULL default '', `imptotal` int(11) NOT NULL default '0', `impmade` int(11) NOT NULL default '0', `clicks` int(11) NOT NULL default '0', `imageurl` varchar(100) NOT NULL default '', `clickurl` varchar(200) NOT NULL default '', `alttext` varchar(255) NOT NULL default '', `date` datetime default NULL, `dateend` datetime default NULL, `position` int(10) NOT NULL default '0', `active` tinyint(1) NOT NULL default '1', `ad_class` varchar(5) NOT NULL default '', `ad_code` text NOT NULL, `ad_width` int(4) default '0', `ad_height` int(4) default '0', PRIMARY KEY  (`bid`), KEY `cid` (`cid`)) ENGINE=MyISAM;


Making it more convenient to count, you'll find:

Quote:

DROP TABLE IF EXISTS $prefix.`_banner`;
CREATE TABLE IF NOT EXISTS $prefix.`_banner` (
1. `bid` int(11) NOT NULL auto_increment,
2.`cid` int(11) NOT NULL default '0',
3. `name` varchar(50) NOT NULL default '',
4. `imptotal` int(11) NOT NULL default '0',
5. `impmade` int(11) NOT NULL default '0',
6.`clicks` int(11) NOT NULL default '0',
7. `imageurl` varchar(100) NOT NULL default '',
8. `clickurl` varchar(200) NOT NULL default '',
9. `alttext` varchar(255) NOT NULL default '',
10. `date` datetime default NULL,
11. `dateend` datetime default NULL,
12. `position` int(10) NOT NULL default '0',
13. `active` tinyint(1) NOT NULL default '1',
14. `ad_class` varchar(5) NOT NULL default '',
15. `ad_code` text NOT NULL,
16. `ad_width` int(4) default '0',
17. `ad_height` int(4) default '0',


So there are currently (2.40 and up) 17 fields. If you look in rndb_upgrade.php in the installation directory, you'll see that the banner table was modified several times. Again I'm stressed for time and don't have time to track back. You just need to look at whatever table you have installed using PHPmyadmin or a similar tool and see how many fields you have, then make the SQL correspond.
 
Raven
PostPosted: Wed Mar 10, 2010 3:03 pm Reply with quote

Please zip up the ddl for your nuke_banner table and your entire Advertising folder and email it to me.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©