Closed (fixed)
Project:
Book Review
Version:
5.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
22 Feb 2008 at 12:56 UTC
Updated:
21 Sep 2009 at 22:00 UTC
user warning: Table 'bookshopofhorror.bsbookreview' doesn't exist query: SELECT COUNT(*) FROM bsbookreview b INNER JOIN bsnode n ON b.nid = n.nid WHERE n.type = 'bookreview' in /home/content/A/d/v/AdvisorGarage/html/bookshopofhorror/includes/database.mysql.inc on line 172.
user warning: Table 'bookshopofhorror.bsbookreview' doesn't exist query: SELECT b.nid, n.title, b.booktitle, b.cover, b.publisher, b.isbn, b.copyright, b.pages, b.rating FROM bsbookreview b INNER JOIN bsnode n ON b.nid = n.nid WHERE n.type = 'bookreview' ORDER BY b.booktitle ASC LIMIT 0, 20 in /home/content/A/d/v/AdvisorGarage/html/bookshopofhorror/includes/database.mysql.inc on line 172.
Comments
Comment #1
AdvisorGarage commentedAny feedback?
Thanks!
Andrew
user warning: Table 'bookshopofhorror.bsbookreview' doesn't exist query: SELECT COUNT(*) FROM bsbookreview b INNER JOIN bsnode n ON b.nid = n.nid WHERE n.type = 'bookreview' in /home/content/A/d/v/AdvisorGarage/html/bookshopofhorror/includes/database.mysql.inc on line 172.
user warning: Table 'bookshopofhorror.bsbookreview' doesn't exist query: SELECT b.nid, n.title, b.booktitle, b.cover, b.publisher, b.isbn, b.copyright, b.pages, b.rating FROM bsbookreview b INNER JOIN bsnode n ON b.nid = n.nid WHERE n.type = 'bookreview' ORDER BY b.booktitle ASC LIMIT 0, 20 in /home/content/A/d/v/AdvisorGarage/html/bookshopofhorror/includes/database.mysql.inc on line 172.
Comment #2
lopolencastredealmeida commentedI'm assuming that you have the last version of the last package available tagged with 5.x-1.x-dev version :D
Check your database to see if there is a database called bookshopofhorror and if it has a table called bsbookreview. Use phpMyAdmin if you have it installed. Note the underlined.
I was looking at the code of bookreview.install and it mention three tables:
This SQL you have only appears once in the file bookreview.module at function theme_bookreview_list() and it seems correct. See if your SQL command is equal to this:
If the code is alright and the table names too then:
Don't forget BACKUP your database before anything. If you mess it up you can always restore it :)
Comment #3
lopolencastredealmeida commentedI think I found the bug.
Bad non-Drupal-standard code :)
Did you choose bs as your table prefix?
If so you must edit the bookreview.install and change a few lines.
It is always better to choose a prefix like bs_ so we can catch the issue at first glance.
More on this at http://api.drupal.org/api/function/hook_install/5
Comment #4
lopolencastredealmeida commentedI made a new corrected install file but, please, don't forget to BACKUP before anything.
Rename your bookreview.install as bookreview.install.old then proceed with the stuff I explained before:
If it still gives the same error then you must:
BACKUP! I didn't test it.
GRAB the new bookreview.install file at http://drupal.org/node/145270#comment-758524
Comment #5
lopolencastredealmeida commentedCan someone check if the file I made corrects the error or not?
Comment #6
summit commentedHi, I think the problem is in hte absense of brackets {} (latest 5.1.dev file), than prefixes to database tables are not working, right?
I changed the install file for MYSQL to have brackets:
If I am mistaken, sorry to interrupt this issue.
Greetings,
Martijn
Comment #7
lopolencastredealmeida commentedThere was a patch for it at #145270: Uninstall of bookreview module
Comment #8
lopolencastredealmeida commented