MySQL Syntax Warning on enabling module
| Project: | Book Expand |
| Version: | 5.x-1.0.x-dev |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Was looking to use this tool as a very needed element (Thank You!) in a site
where we are doing all content in books and need to control access to those
books on a group basis.
When enabling this on 2 different working versions of our site, we are getting
this warning, apparently generated by the database.mysql.inc file in drupal.
user warning:
You have an error in your SQL syntax; check the manual that corresponds
to your MySQL server version for the right syntax to use near
') /*!40100 DEFAULT CHARACTER SET utf8 */' at line 4 query:
CREATE TABLE og_book ( `og_nid` int(11) NOT NULL default '0', `book_nid` int(11) NOT NULL default '0', )
/*!40100 DEFAULT CHARACTER SET utf8 */;
in /usr/share/drupal/includes/database.mysql.inc on line 172.
UTF8 is the default in both databases, so that doesn't seem to be
the flag for the problem. We DO have existing books on both sites.
We are going to try some expand book tests anyway... but would
love an explanation of the warning if you know it off the top of
your head.

#1
It looks like there is an extra comma at the end of the CREATE TABLE declaration.
Try:
CREATE TABLE og_book ( `og_nid` int(11) NOT NULL default '0', `book_nid` int(11) NOT NULL default '0' )/*!40100 DEFAULT CHARACTER SET utf8 */;
Instead.
#2
For me it works with no change needed.