Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2011
    Location
    Pensacola, FL
    Posts
    88
    Plugin Contributions
    4

    Default Default DATETIME issues with SQL install (Links Manager)

    I am looking at Links Manager for use on a site, but am having trouble with the SQL install file, I believe in the following statement:

    Code:
    CREATE TABLE rnm_links(
    `links_id` int( 11 ) NOT NULL AUTO_INCREMENT ,
    `links_url` varchar( 255 ) default NULL ,
    `links_reciprocal_url` varchar( 255 ) default NULL ,
    `links_image_url` varchar( 255 ) default NULL ,
    `links_contact_name` varchar( 64 ) default NULL ,
    `links_contact_email` varchar( 96 ) default NULL ,
    `links_date_added` datetime NOT NULL default '0000-00-00 00:00:00',
    `links_last_modified` datetime default NULL ,
    `links_status` tinyint( 1 ) NOT NULL default '1',
    `links_clicked` int( 11 ) NOT NULL default '0',
    PRIMARY KEY ( `links_id` ) ,
    KEY `idx_links_date_added` ( `links_date_added` )
    ) TYPE = MYISAM ;
    Found a stackoverflow thread and tried replacing
    Code:
      `links_date_added` datetime NOT NULL default '0000-00-00 00:00:00',
    `links_last_modified` datetime default NULL
    with
    Code:
       `links_date_added`     DATETIME DEFAULT CURRENT_TIMESTAMP,
        `links_last_modified` DATETIME ON UPDATE CURRENT_TIMESTAMP
    get "invalid default value" message.

    Someone had recommended using a "trigger". I thought I'd reach out to the ZC community for any possible insight before resuming on the morrow.

  2. #2
    Join Date
    Aug 2005
    Location
    Vic, Oz
    Posts
    1,905
    Plugin Contributions
    5

    Default Re: Default DATETIME issues with SQL install (Links Manager)

    Quote Originally Posted by mutinyzoo View Post
    I am looking at Links Manager for use on a site, but am having trouble with the SQL install file, I believe in the following statement:

    Code:
    CREATE TABLE rnm_links(
    `links_id` int( 11 ) NOT NULL AUTO_INCREMENT ,
    `links_url` varchar( 255 ) default NULL ,
    `links_reciprocal_url` varchar( 255 ) default NULL ,
    `links_image_url` varchar( 255 ) default NULL ,
    `links_contact_name` varchar( 64 ) default NULL ,
    `links_contact_email` varchar( 96 ) default NULL ,
    `links_date_added` datetime NOT NULL default '0000-00-00 00:00:00',
    `links_last_modified` datetime default NULL ,
    `links_status` tinyint( 1 ) NOT NULL default '1',
    `links_clicked` int( 11 ) NOT NULL default '0',
    PRIMARY KEY ( `links_id` ) ,
    KEY `idx_links_date_added` ( `links_date_added` )
    ) TYPE = MYISAM ;
    What is the "trouble" you are having with this install sql?

    btw: You need to change
    TYPE = MYISAM
    to
    ENGINE = MYISAM

  3. #3
    Join Date
    Mar 2011
    Location
    Pensacola, FL
    Posts
    88
    Plugin Contributions
    4

    Default Re: Default DATETIME issues with SQL install (Links Manager)

    Quote Originally Posted by gilby View Post
    What is the "trouble" you are having with this install sql?

    btw: You need to change
    TYPE = MYISAM
    to
    ENGINE = MYISAM
    The trouble is that the SQL statement is not valid for MySQL 5.5, and the server I'm running on does not have 5.6. So
    Code:
    `links_date_added` datetime NOT NULL default '0000-00-00 00:00:00'
    returns an error (as stated above).

    I will experiment either with using TIMESTAMP or a TRIGGER instead and post results.

  4. #4
    Join Date
    Mar 2011
    Location
    Pensacola, FL
    Posts
    88
    Plugin Contributions
    4

    Default Re: Default DATETIME issues with SQL install (Links Manager)

    I probably should have begun this discussion on the Links Manager support thread and will move the conversation there.

 

 

Similar Threads

  1. Update sql patch links manager 3.0
    By ceesdk in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 17 Feb 2014, 03:58 PM
  2. zen faq manager 1.2_IT_EN install SQL issue,
    By vgambrell in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 13 May 2009, 04:01 AM
  3. Links Manager 1.5 - email handling issue + other issues
    By heavenlynights in forum All Other Contributions/Addons
    Replies: 6
    Last Post: 12 Jan 2007, 05:31 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR