I received the following error messages on installation. No previous version of Advertisement had been installed and the ads table was not created.

* user warning: Table 'my_database.ads' doesn't exist query: SELECT * FROM ads WHERE aid = 79 in /home/my_account/public_html/includes/database.mysql.inc on line 172.
* user warning: Table 'my_database.ads' doesn't exist query: SELECT * FROM ads WHERE aid = 78 in /home/my_account/public_html/includes/database.mysql.inc on line 172.
* user warning: Table 'my_database.ads' doesn't exist query: SELECT * FROM ads WHERE aid = 15 in /home/my_account/public_html/includes/database.mysql.inc on line 172.
* user warning: Table 'my_database.ads' doesn't exist query: SELECT * FROM ads WHERE aid = 18 in /home/my_account/public_html/includes/database.mysql.inc on line 172.
* user warning: Table 'my_database.ads' doesn't exist query: SELECT * FROM ads WHERE aid = 66 in /home/my_account/public_html/includes/database.mysql.inc on line 172.
* user warning: Table 'my_database.ads' doesn't exist query: SELECT * FROM ads WHERE aid = 53 in /home/my_account/public_html/includes/database.mysql.inc on line 172.
* user warning: Table 'my_database.ads' doesn't exist query: SELECT * FROM ads WHERE aid = 76 in /home/my_account/public_html/includes/database.mysql.inc on line 172.
* user warning: Table 'my_database.ads' doesn't exist query: SELECT * FROM ads WHERE aid = 62 in /home/my_account/public_html/includes/database.mysql.inc on line 172.
* user warning: Table 'my_database.ads' doesn't exist query: SELECT * FROM ads WHERE aid = 30 in /home/my_account/public_html/includes/database.mysql.inc on line 172.
* user warning: Table 'my_database.ads' doesn't exist query: SELECT * FROM ads WHERE aid = 79 in /home/my_account/public_html/includes/database.mysql.inc on line 172.
* user warning: Table 'my_database.ads' doesn't exist query: SELECT * FROM ads WHERE aid = 78 in /home/my_account/public_html/includes/database.mysql.inc on line 172.
* user warning: Table 'my_database.ads' doesn't exist query: SELECT * FROM ads WHERE aid = 15 in /home/my_account/public_html/includes/database.mysql.inc on line 172.
* user warning: Table 'my_database.ads' doesn't exist query: SELECT * FROM ads WHERE aid = 18 in /home/my_account/public_html/includes/database.mysql.inc on line 172.
* user warning: Table 'my_database.ads' doesn't exist query: SELECT * FROM ads WHERE aid = 66 in /home/my_account/public_html/includes/database.mysql.inc on line 172.
* user warning: Table 'my_database.ads' doesn't exist query: SELECT * FROM ads WHERE aid = 53 in /home/my_account/public_html/includes/database.mysql.inc on line 172.
* user warning: Table 'my_database.ads' doesn't exist query: SELECT * FROM ads WHERE aid = 76 in /home/my_account/public_html/includes/database.mysql.inc on line 172.
* user warning: Table 'my_database.ads' doesn't exist query: SELECT * FROM ads WHERE aid = 62 in /home/my_account/public_html/includes/database.mysql.inc on line 172.
* user warning: Table 'my_database.ads' doesn't exist query: SELECT * FROM ads WHERE aid = 30 in /home/my_account/public_html/includes/database.mysql.inc on line 172.
* user warning: Table 'my_database.ad_groups' doesn't exist query: SELECT gid, name FROM ad_groups in /home/my_account/public_html/includes/database.mysql.inc on line 172.

Comments

jeremy’s picture

I can't imagine what would cause these errors if you've not had the ad module installed before. Did you install the 5.x-1.0-1 version of the module on a site running not running Drupal 5? What version of Drupal are you using?

You might try running the following command in your database and try enabling the ad module again:

     mysql> DELETE FROM system WHERE name ='ad';

What are the nodes that the module seems to think are ads? ie, what's at node/79? node/78?

When do you get these errors, from the modules page after enabling the module the first time?

bsonnich’s picture

Status: Active » Fixed

Weird. When I ran that command you gave me it definitely fixed it. Maybe I did install this on this database before...... Sorry for the trouble.

The nodes were categories.

bsonnich’s picture

Status: Fixed » Active

Sorry. This error just popped up a couple clicks after submitting that last message.
The error shows on admin/content/ad/configure/ad_image.

user warning: Table 'my_database.ad_image_format' doesn't exist query: SELECT * FROM ad_image_format WHERE gid = 1 in /home/mysite/public_html/includes/database.mysql.inc on line 172.

jeremy’s picture

It sounds like you've already installed a very early version of the ad module, and this is causing you some problems. Your best bet is to drop all tables starting with the word 'ad_', and 'ads', then delete all system table entries that have names starting with 'ad_*' and 'ad' as well. That done, you should be able to re-enable the modules and get a clean start.

bsonnich’s picture

Category: bug » support
Status: Active » Fixed

Thanks Jeremy. Cleaning out the system table of all ad-related fields solved the problem.

Anonymous’s picture

Status: Fixed » Closed (fixed)