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
https://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;

CREATE TABLE `yogurt_tribes` (
  `
tribe_idint(11NOT NULL auto_increment,
  `
owner_uidint(11NOT NULL,
  `
tribe_titlevarchar(255NOT NULL,
  `
tribe_desctinytext NOT NULL,
  `
tribe_imgvarchar(255NOT NULL,
  `
datetimetimestamp NOT NULL default '',
  
PRIMARY KEY  (`tribe_id`)
ENGINE=MyISAM;


instead of

CREATE TABLE `yogurt_tribes` (
  `
tribe_idint(11NOT NULL auto_increment,
  `
owner_uidint(11NOT NULL,
  `
tribe_titlevarchar(255NOT NULL,
  `
tribe_desctinytext NOT NULL,
  `
tribe_imgvarchar(255NOT NULL,
`
datetimetimestamp 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.

CREATE TABLE `yogurt_friendpetition` (
  `
friendpet_idint(11NOT NULL auto_increment,
  `
petitioner_uidint(11NOT NULL,
  `
petioned_uidint(11NOT NULL,
  
PRIMARY KEY  (`friendpet_id`)
TYPE=MyISAM;


CREATE TABLE `yogurt_friendship` (
  `
friendship_idint(11NOT NULL auto_increment,
  `
friend1_uidint(11NOT NULL,
  `
friend2_uidint(11NOT NULL,
  `
levelint(11NOT NULL,
  `
hottinyint(4NOT NULL,
  `
trusttinyint(4NOT NULL,
  `
cooltinyint(4NOT NULL,
  `
fantinyint(4NOT NULL,
  
PRIMARY KEY  (`friendship_id`)
TYPE=MyISAM;

CREATE TABLE `yogurt_images` (
  `
cod_imgint(11NOT NULL auto_increment,
  `
titlevarchar(255NOT NULL,
  `
data_creationdate NOT NULL,
  `
data_updatedate NOT NULL,
  `
uid_ownervarchar(50NOT NULL,
  `
urltext NOT NULL,
  `
privatevarchar(1NOT NULL,
  
PRIMARY KEY  (`cod_img`)
TYPE=MyISAM  ;

CREATE TABLE `yogurt_visitors` (
  `
cod_visitint(11NOT NULL auto_increment,
  `
uid_ownerint(11NOT NULL,
  `
uid_visitorint(11NOT NULL,
  `
uname_visitorvarchar(30NOT NULL,
  
PRIMARY KEY  (`cod_visit`)
TYPE=MyISAM;

CREATE TABLE `yogurt_seutubo` (
  `
video_idint(11NOT NULL auto_increment,
  `
uid_ownerint(11NOT NULL,
  `
video_desctext NOT NULL,
  `
youtube_codevarchar(11NOT NULL,
  `
main_videovarchar(1NOT NULL,
  
PRIMARY KEY  (`video_id`)
TYPE=MyISAM;


CREATE TABLE `yogurt_reltribeuser` (
  `
rel_idint(11NOT NULL auto_increment,
  `
rel_tribe_idint(11NOT NULL,
  `
rel_user_uidint(11NOT NULL,
  
PRIMARY KEY  (`rel_id`)
ENGINE=MyISAM;


CREATE TABLE `yogurt_tribes` (
  `
tribe_idint(11NOT NULL auto_increment,
  `
owner_uidint(11NOT NULL,
  `
tribe_titlevarchar(255NOT NULL,
  `
tribe_desctinytext NOT NULL,
  `
tribe_imgvarchar(255NOT NULL,
  `
datetimetimestamp NOT NULL default '',
  
PRIMARY KEY  (`tribe_id`)
ENGINE=MyISAM;

CREATE TABLE `yogurt_scraps` (
  `
scrap_idint(11NOT NULL auto_increment,
  `
scrap_texttext NOT NULL,
  `
scrap_fromint(11NOT NULL,
  `
scrap_toint(11NOT NULL,
  `
privatetinyint(1NOT NULL,
  `
datetimestamp NOT NULL default '',
  
PRIMARY KEY  (`scrap_id`)
ENGINE=MyISAM;

CREATE TABLE `yogurt_configs` (
  `
config_idint(11NOT NULL auto_increment,
  `
config_uidint(11NOT NULL,
  `
picturestinyint(1NOT NULL,
  `
videostinyint(1NOT NULL,
  `
tribestinyint(1NOT NULL,
  `
scrapstinyint(1NOT NULL,
  `
friendstinyint(1NOT NULL,
  `
profile_contacttinyint(1NOT NULL,
  `
profile_generaltinyint(1NOT NULL,
  `
profile_statstinyint(1NOT NULL,
  `
suspensiontinyint(1NOT NULL,
  `
backup_passwordvarchar(255NOT NULL,
  `
backup_emailvarchar(255NOT NULL,
  `
end_suspensiontimestamp NOT NULL default '',
  
PRIMARY KEY  (`config_id`),
  
KEY `config_uid` (`config_uid`)
ENGINE=MyISAM  ;

CREATE TABLE `yogurt_suspensions` (
  `
uidint(11NOT NULL,
  `
old_passvarchar(32NOT NULL,
  `
old_emailvarchar(60NOT NULL,
  `
old_signaturetext NOT NULL,
  `
suspension_timeint(11NOT 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.

Login

Who's Online

127 user(s) are online (90 user(s) are browsing Support Forums)


Members: 0


Guests: 127


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits