1
elbeer
Yogurt 2.9 beta
  • 2007/12/9 17:57

  • elbeer

  • Just popping in

  • Posts: 68

  • Since: 2007/8/26


got a problem with MySQL version


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 'CURRENT_TIMESTAMP, PRIMARY KEY (`tribe_id`) ) ENGINE=MyISAM'

i am using MySQL Version 4.0.25-standard

2
BlueStocking
Re: Yogurt 2.9 beta

The same error msg and solution in a similar event.

http://sql-info.de/en/mysql/gotchas.html#1_7

The corrected syntex here may help you in trouble-shooting your own problem.

_________________
ERROR 1064: 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 'NOW())' at line 3
hhttps://xoops.org/modules/repository .. It is time to get involved - XOOPS.ORG

3
mixx86
Re: Yogurt 2.9 beta
  • 2007/12/9 19:30

  • mixx86

  • Just popping in

  • Posts: 14

  • Since: 2005/6/22


Your issue is due to using an old version of MySQL that does not support the function. I have absolutely no knowledge about MySQL, so I did alot of research on web web to find the answer.

I changed all the code having to do with 'CURRENT_TIMESTAMP' to one that will work with the old MySQL, and have not had any problems with the functionality of this module.

I give an example;

le="color: #000000"><?php CREATE TABLE `yogurt_tribes` ( `tribe_id` int(11) NOT NULL auto_increment, `owner_uid` int(11) NOT NULL, `tribe_title` varchar(255) NOT NULL, `tribe_desc` tinytext NOT NULL, `tribe_img` varchar(255) NOT NULL, `datetime` timestamp NOT NULL default '', PRIMARY KEY (`tribe_id`) ) ENGINE=MyISAM;


instead of

le="color: #000000"><?php CREATE TABLE `yogurt_tribes` ( `tribe_id` int(11) NOT NULL auto_increment, `owner_uid` int(11) NOT NULL, `tribe_title` varchar(255) NOT NULL, `tribe_desc` tinytext NOT NULL, `tribe_img` varchar(255) NOT NULL, `datetime` timestamp NOT NULL default CURRENT_TIMESTAMP, PRIMARY KEY (`tribe_id`) ) ENGINE=MyISAM;


If you want, you could copy/paste my version of the mysql.sql to replace the one you find in the SQL directory of the module.

le="color: #000000"><?php CREATE TABLE `yogurt_friendpetition` ( `friendpet_id` int(11) NOT NULL auto_increment, `petitioner_uid` int(11) NOT NULL, `petioned_uid` int(11) NOT NULL, PRIMARY KEY (`friendpet_id`) ) TYPE=MyISAM; CREATE TABLE `yogurt_friendship` ( `friendship_id` int(11) NOT NULL auto_increment, `friend1_uid` int(11) NOT NULL, `friend2_uid` int(11) NOT NULL, `level` int(11) NOT NULL, `hot` tinyint(4) NOT NULL, `trust` tinyint(4) NOT NULL, `cool` tinyint(4) NOT NULL, `fan` tinyint(4) NOT NULL, PRIMARY KEY (`friendship_id`) ) TYPE=MyISAM; CREATE TABLE `yogurt_images` ( `cod_img` int(11) NOT NULL auto_increment, `title` varchar(255) NOT NULL, `data_creation` date NOT NULL, `data_update` date NOT NULL, `uid_owner` varchar(50) NOT NULL, `url` text NOT NULL, `private` varchar(1) NOT NULL, PRIMARY KEY (`cod_img`) ) TYPE=MyISAM ; CREATE TABLE `yogurt_visitors` ( `cod_visit` int(11) NOT NULL auto_increment, `uid_owner` int(11) NOT NULL, `uid_visitor` int(11) NOT NULL, `uname_visitor` varchar(30) NOT NULL, PRIMARY KEY (`cod_visit`) ) TYPE=MyISAM; CREATE TABLE `yogurt_seutubo` ( `video_id` int(11) NOT NULL auto_increment, `uid_owner` int(11) NOT NULL, `video_desc` text NOT NULL, `youtube_code` varchar(11) NOT NULL, `main_video` varchar(1) NOT NULL, PRIMARY KEY (`video_id`) ) TYPE=MyISAM; CREATE TABLE `yogurt_reltribeuser` ( `rel_id` int(11) NOT NULL auto_increment, `rel_tribe_id` int(11) NOT NULL, `rel_user_uid` int(11) NOT NULL, PRIMARY KEY (`rel_id`) ) ENGINE=MyISAM; CREATE TABLE `yogurt_tribes` ( `tribe_id` int(11) NOT NULL auto_increment, `owner_uid` int(11) NOT NULL, `tribe_title` varchar(255) NOT NULL, `tribe_desc` tinytext NOT NULL, `tribe_img` varchar(255) NOT NULL, `datetime` timestamp NOT NULL default '', PRIMARY KEY (`tribe_id`) ) ENGINE=MyISAM; CREATE TABLE `yogurt_scraps` ( `scrap_id` int(11) NOT NULL auto_increment, `scrap_text` text NOT NULL, `scrap_from` int(11) NOT NULL, `scrap_to` int(11) NOT NULL, `private` tinyint(1) NOT NULL, `date` timestamp NOT NULL default '', PRIMARY KEY (`scrap_id`) ) ENGINE=MyISAM; CREATE TABLE `yogurt_configs` ( `config_id` int(11) NOT NULL auto_increment, `config_uid` int(11) NOT NULL, `pictures` tinyint(1) NOT NULL, `videos` tinyint(1) NOT NULL, `tribes` tinyint(1) NOT NULL, `scraps` tinyint(1) NOT NULL, `friends` tinyint(1) NOT NULL, `profile_contact` tinyint(1) NOT NULL, `profile_general` tinyint(1) NOT NULL, `profile_stats` tinyint(1) NOT NULL, `suspension` tinyint(1) NOT NULL, `backup_password` varchar(255) NOT NULL, `backup_email` varchar(255) NOT NULL, `end_suspension` timestamp NOT NULL default '', PRIMARY KEY (`config_id`), KEY `config_uid` (`config_uid`) ) ENGINE=MyISAM ; CREATE TABLE `yogurt_suspensions` ( `uid` int(11) NOT NULL, `old_pass` varchar(32) NOT NULL, `old_email` varchar(60) NOT NULL, `old_signature` text NOT NULL, `suspension_time` int(11) NOT NULL, PRIMARY KEY (`uid`) ) ENGINE=MyISAM;


Hope it helps. This module have alot of promise, although a little buggy. I have no skills as an PHP programmer, but after this release, I have begun a little studying to be able to modify it to suit my needs and to fix a few of the more irritating bugs (fx. some users could not change their Avatar, while others could, so I added a new tab to solve the issue)

Good luck.