Error on install: support for mysqli en pgsql missing
| Project: | Reservation |
| Version: | 5.x-1.0-beta6 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
Jump to:
Error on install / MySQL-Fehler bei beiden Versionen:
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 'tables int(10) not null default 0, chairrows int(10) not nu query: CREATE TABLE reservation ( vid int(10) unsigned NOT NULL default '0', nid int(10) unsigned NOT NULL default '0', tables int(10) not null default 0, chairrows int(10) not null default 0, seatspertable int(10) not null default 0, seatsperrow int(10) not null default 0, pricenormal decimal(6,2) not null default '0.00', pricereduced decimal(6,2) not null default '0.00', PRIMARY KEY (vid, nid), KEY `reservation_nid` (nid) ) DEFAULT CHARACTER SET utf8 ; in /var/www/web13/html/includes/database.mysql.inc on line 172.

#1
thanks for reporting.
Which mysql-version do you use? I tested the first table on MySQL - 5.0.18-nt, and it passed.
Please try, if this version runs for you. I quoted all default values.
(it's the whole reservation.install)
<?php
function reservation_install() {
switch ($GLOBALS['db_type']) {
case 'mysql':
db_query("CREATE TABLE {reservation} (
vid int(10) unsigned NOT NULL default '0',
nid int(10) unsigned NOT NULL default '0',
tables int(10) not null default '0',
chairrows int(10) not null default '0',
seatspertable int(10) not null default '0',
seatsperrow int(10) not null default '0',
pricenormal decimal(6,2) not null default '0.00',
pricereduced decimal(6,2) not null default '0.00',
PRIMARY KEY (vid, nid),
KEY `reservation_nid` (nid)
) DEFAULT CHARACTER SET utf8 ;");
db_query("CREATE TABLE {reservation_reserved} (
rbid int(10) unsigned NOT NULL default '0',
vid int(10) unsigned NOT NULL default '0',
nid int(10) unsigned NOT NULL default '0',
seat varchar(10) not null default '-',
reservationtype varchar(20) not null default 'reservation',
price decimal(6,2) not null default '0.00',
pricetype varchar(10) not null default 'standard',
status varchar(10) not null default 'reserviert',
rgid int(10) not null default '0',
PRIMARY KEY (rbid),
KEY `reservation_reserved_rgid` (vid, nid)
) DEFAULT CHARACTER SET utf8 ;");
db_query("CREATE TABLE {reservation_guest} (
rgid int(10) unsigned NOT NULL default '0',
title varchar(10),
surname varchar(50),
forename varchar(50),
street varchar(50),
zipcode varchar(10),
city varchar(50),
mail varchar(50),
phone varchar(50),
comment text,
resdatestamp varchar(13),
resip varchar(15),
PRIMARY KEY (rgid)
) DEFAULT CHARACTER SET utf8 ;");
break;
}
}
function reservation_uninstall() {
db_query('DROP TABLE {reservation}');
db_query('DROP TABLE {reservation_reserved}');
db_query('DROP TABLE {reservation_guest}');
}
#2
#3
Support for mysqli en pgsql is missing in the install file. When using mysqli, the database tables are not created and the module throws an error when creating an reservation node.
#4
I have the same situation - using mysqli database tables are not created. I created them by hand in phpMyAdmin, I was able to create a Reservation content type but then reserving seats was impossible - next error.
Drupal 5.16, MySQL 5.0.51b, PHP 5.2.6, XAMPP on localhost
#5
sorry, I've got no clue on mysqli or pgsql. Therefore it's missing. If anyone wants to provide a patch, you are welcome to do so ;)
#6