Giter Site home page Giter Site logo

Syntax error with mysql 5.6.24 about rmcommon HOT 3 CLOSED

bitcero avatar bitcero commented on September 24, 2024
Syntax error with mysql 5.6.24

from rmcommon.

Comments (3)

cesagonchu avatar cesagonchu commented on September 24, 2024

Same problem with mysql 5.5.43:
#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 '
KEY event (event),
KEY element (element),
KEY uid (uid)
)' at line 9

from rmcommon.

cesagonchu avatar cesagonchu commented on September 24, 2024

I don't have this problem with rmcommon 2.2.82:
http://github.com/bitcero/rmcommon/releases/tag/v2.2.82

The difference between latest version and 2.2.82 is on latest version, you added this code in rmcommon/sql/mysql.sql:
CREATE TABLE mod_rmcommon_notifications (
id_notification int(11) NOT NULL AUTO_INCREMENT,
event varchar(50) NOT NULL,
element varchar(50) NOT NULL,
params varchar(50) NOT NULL,
uid int(11) NOT NULL,
type varchar(10) NOT NULL DEFAULT 'module',
date datetime NOT NULL,
PRIMARY KEY id_notification,
KEY event (event),
KEY element (element),
KEY uid (uid)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

from rmcommon.

bitcero avatar bitcero commented on September 24, 2024

Yes, this is an error. The correct code must be:

CREATE TABLE IF NOT EXISTS `mod_rmcommon_notifications` (
  `id_notification` int(11) NOT NULL AUTO_INCREMENT,
  `event` varchar(50) NOT NULL,
  `element` varchar(50) NOT NULL,
  `params` varchar(50) NOT NULL,
  `uid` int(11) NOT NULL,
  `type` varchar(10) NOT NULL DEFAULT 'module',
  `date` datetime NOT NULL,
  PRIMARY KEY (`id_notification`),
  KEY `event` (`event`),
  KEY `element` (`element`),
  KEY `uid` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

I'm preparing the commit...

from rmcommon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.