error SQL

Help with installation and general calendar setttings

error SQL

Postby catchap » Sun Apr 10, 2011 6:49 pm

Hello,
I have this message at the install (server OVH) :

Error creating database table - Create Table - BOOKINGS
CREATE TABLE IF NOT EXISTS `bookings` ( `id` int(11) NOT NULL auto_increment, `id_item` int(20) NOT NULL default '0', `the_date` date NOT NULL default '0000-00-00', `id_state` int(11) NOT NULL default '0', `id_booking` int(10) NOT NULL default '0', PRIMARY KEY (`id`), KEY `id_item` (`id_item`), KEY `id_state` (`id_state`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
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 'DEFAULT CHARSET=utf8 AUTO_INCREMENT=1' at line 10

Could you help me please ?
catchap
 
Posts: 5
Joined: Sat Apr 09, 2011 4:19 pm

Re: error SQL

Postby chris » Sun Apr 10, 2011 7:00 pm

Hi,
I seem to remember this being an issue before for another user. It appears that some servers don't like/allow the ENGINE=MyISAM.

Could you open up the ac-install.php file and remove this from the create queries:
Code: Select all
ENGINE=MyISAM

A search and replace (with nothing) on the document should work fine.

Chris
User avatar
chris
Site Admin
 
Posts: 1089
Joined: Mon Dec 17, 2007 7:42 pm
Location: Málaga, Spain

Re: error SQL

Postby catchap » Sun Apr 10, 2011 7:19 pm

Thanks for your fast answer,
I've tried, but it's the same result :

Error creating database table - Create Table - BOOKINGS
CREATE TABLE IF NOT EXISTS `bookings` ( `id` int(11) NOT NULL auto_increment, `id_item` int(20) NOT NULL default '0', `the_date` date NOT NULL default '0000-00-00', `id_state` int(11) NOT NULL default '0', `id_booking` int(10) NOT NULL default '0', PRIMARY KEY (`id`), KEY `id_item` (`id_item`), KEY `id_state` (`id_state`) ) DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
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 'DEFAULT CHARSET=utf8 AUTO_INCREMENT=1' at line 10
catchap
 
Posts: 5
Joined: Sat Apr 09, 2011 4:19 pm

Re: error SQL

Postby chris » Sun Apr 10, 2011 7:48 pm

Hmmm, not sure what else to suggest.
That query works fine on my server (just checked).

Have you tried running it directly in phpmyadmin or similar?

Chris
User avatar
chris
Site Admin
 
Posts: 1089
Joined: Mon Dec 17, 2007 7:42 pm
Location: Málaga, Spain

Re: error SQL

Postby catchap » Sun Apr 10, 2011 10:09 pm

when I install the calendar locally (apache), I have another problem. The tables are created and the calendar appears good, but ..... I cannot access the following months. I have the following error message that appears:

Notice: Undefined variable: error in C:\Program Files\EasyPHP-5.3.6.0\www\calendar\ac-includes\db_connect.inc.php on line 19

Warning: mktime() expects parameter 4 to be long, string given in C:\Program Files\EasyPHP-5.3.6.0\www\calendar\ac-includes\functions.inc.php on line 20

Warning: cal_days_in_month() expects parameter 2 to be long, string given in C:\Program Files\EasyPHP-5.3.6.0\www\calendar\ac-includes\functions.inc.php on line 22
ERROR checking id item availability dates
Champ 'NaN' inconnu dans where clause

one idea ?
catchap
 
Posts: 5
Joined: Sat Apr 09, 2011 4:19 pm

Re: error SQL

Postby catchap » Wed Apr 13, 2011 7:03 pm

I solved the problem by removing "DEFAULT CHARSET=utf8".
Everything is now ok.
Thank you very much for this application, Chris :))
catchap
 
Posts: 5
Joined: Sat Apr 09, 2011 4:19 pm

Re: error SQL

Postby chris » Wed Apr 13, 2011 10:24 pm

Hi,
Sorry I missed your original post, I don't often do that. :(

I'm glad to hear that you fixed it and also to know the solution. I wonder why your server doesn't like "DEFAULT CHARSET=utf8" ?

Thanks

Chris
User avatar
chris
Site Admin
 
Posts: 1089
Joined: Mon Dec 17, 2007 7:42 pm
Location: Málaga, Spain


Return to Support

Who is online

Users browsing this forum: No registered users and 2 guests

cron