Menu

Errors on import of create_tables

Help
2016-05-04
2016-05-04
  • Sam Mattern

    Sam Mattern - 2016-05-04

    When I first tried to import create_tables in PHYMyAdmin to my database, I got an error regarding TYPE=MyISAM. I figured out that I needed to change all references to TYPE to ENGINE instead. However, now I'm getting the following error:

    #
    # Table structure for table `metars`
    #
    
    CREATE TABLE metars (
      metar varchar(255) NOT NULL default '',
      timestamp timestamp(14) NOT NULL,
      station varchar(4) NOT NULL default '',
      PRIMARY KEY  (station),
      UNIQUE KEY station (station)
    ) ENGINE=MyISAM;
    
    MySQL said: Documentation 
     #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 '(14) NOT NULL,
       station varchar(4) NOT NULL default '',
       PRIMARY KEY  (station' at line 9 
    

    Any help is appreciated.

    Sam

     
    • Stan

      Stan - 2016-05-04

      timestamp should not have length, (It's timestamp not timestamp(14))

      CREATE TABLE IF NOT EXISTS MVElog_online (

      session varchar(32) NOT NULL default '0',

      logTime timestamp NOT NULL, -- HERE

      ID_MEMBER mediumint(8) unsigned NOT NULL default '0',

      ip int(10) unsigned NOT NULL default '0',

      url text NOT NULL,

      PRIMARY KEY (session),

      KEY logTime (logTime),

      KEY ID_MEMBER (ID_MEMBER)

      ) ENGINE=MyISAM;

      Stan Arnold

      Chief Information Officer


      signature

      7074 Grove Road

      Suite 108

      Brooksville, Florida 34609

      P. 813-978-1420 ext.0396

      C. 352-584-5388

      F. 813-978-1951

      Email: sarnold@oglethorpeinc.com sarnold@oglethorpeinc.com

      Tech Support Email: techsupport@oglethorpeinc.com
      techsupport@oglethorpeinc.com

      From: Sam Mattern [mailto:botnet@users.sf.net]
      Sent: Wednesday, May 04, 2016 12:45 PM
      To: [timeclock:discussion]
      Subject: [timeclock:discussion] Errors on import of create_tables

      When I first tried to import create_tables in PHYMyAdmin to my database, I
      got an error regarding TYPE=MyISAM. I figured out that I needed to change
      all references to TYPE to ENGINE instead. However, now I'm getting the
      following error:

      Table structure for table metars

      CREATE TABLE metars (
      metar varchar(255) NOT NULL default '',
      timestamp timestamp(14) NOT NULL,
      station varchar(4) NOT NULL default '',
      PRIMARY KEY (station),
      UNIQUE KEY station (station)
      ) ENGINE=MyISAM;

      MySQL said: Documentation
      #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
      '(14) NOT NULL,
      station varchar(4) NOT NULL default '',
      PRIMARY KEY (station' at line 9

      Any help is appreciated.

      Sam


      Errors on import of create_tables
      https://sourceforge.net/p/timeclock/discussion/414545/thread/ecffac36/?limi t=25#5db1


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/timeclock/discussion/414545/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       
  • Sam Mattern

    Sam Mattern - 2016-05-04

    Just to be clear to anyone else who stumbles upon this, changing:

    timestamp timestamp(14) NOT NULL,
    

    to

    timestamp timestamp NOT NULL,
    

    solved this issue. Thanks Stan!

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.