I have installed and have running the great Ad module. My only problem is that it shos this warning, and I don't get how to fix it. It makes one for every ad I upload.

    * user warning: Unknown column 'extra' in 'where clause' query: UPDATE ad_statistics SET count = count + 1 WHERE aid = 89 AND action = 'view' AND date = 2009041714 AND adgroup = '0' AND extra = '' AND hostid = '' in /usr/local/www/vhosts/mydomain/httpdocs/drupal/sites/all/modules/ad/adcache.inc on line 299.

Any help will be very welcome!

Edit:

By the way, I'm also unsable to theme the ads when I use the "image ad" (using text or html is way easier, since I can write my code).

I just want them to be centered, and I'm using the code given in the module documentation for theming (http://drupal.org/node/394324), where it says tath "All ads are wrapped in the following tags: <div class="advertisement" id="group-#"></div>" and the following CSS code is given:

.advertisement { 
padding: 5px; 
border: dashed; 
background-color: #ffd; 
}

.advertisement:before { 
content: &quot;Advertisement:&quot;;
}

But it changes nothing. Moreover, reading the code of my page the ads appear under the following code:

  <div class="sidebox-content">
  <script type='text/javascript' src='http://www.mydomain.com/drupal/sites/all/modules/ad/serve.php?q=1&amp;t=20&amp;u=node/75'></script>  </div>
  </div>

So I can't change it without affecting all the other blocks.

Comments

Alaska’s picture

Had the same issue and checked the source code. For these classes try

.html-advertisement
and
.text-advertisement

Made the change and it worked on this end with Drupal 6.10 and Ad 6.x-2.0.

dresde’s picture

Thanks Alaska,

My problem comes when trying to edit the image ads, html and texts are under control, hehehe. Maybe with .image-advertisement?

cronix’s picture

I am having a similar issue here with:

user warning: Unknown column 'extra' in 'field list' query: ad_redirect /* andre : ad_redirect */ INSERT INTO ad_clicks (aid, uid, status, hostname, user_agent, adgroup, extra, hostid, url, timestamp) VALUES (156, 1, 4, '86.90.108.5', 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; nl-nl) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16', 't515', 'Array', '', 'node', 1241816630) in /var/www/earth/sites/all/modules/ad/ad.module on line 242.

Does anyone know how to fix this? I get this even when I try to edit a story node.

dresde’s picture

In my case I found the solution going to the Issues in the module page, and the way to fiz it was making a "downgrade" when running update.php in the ad module.

http://drupal.org/node/422936

Cbeck’s picture

I copied this code on to my theme CSS file and it didn't display the text "Advertisement" above the add.
I replaced & quot; with the actual character for double quotes and it worked!