Differences in db structure for MySQL 3 & 4 is causing me probs
Results 1 to 2 of 2

Thread: Differences in db structure for MySQL 3 & 4 is causing me probs

  1. #1
    Closet Nice Guy schwim's Avatar
    Join Date
    Jun 2006
    Location
    State of confusion
    Posts
    660

    Differences in db structure for MySQL 3 & 4 is causing me probs

    Hi there,

    I'm trying to create a handy install script and I've run into a problem.

    I understand that MySQL 3 doesn't understand charsets and such, so I stripped that from the db text. Once that was done, all of my tables would install into either 4 or 3, except for one. My postdate was failing because of CURRENT_TIMESTAMP.

    Quote Originally Posted by MySQL
    `postdate` timestamp NULL default CURRENT_TIMESTAMP,
    If I remove the default portion, it installs fine. My question is: Is there a MySQL 3 equivalent? Wouldn't it be a common thing to be needed, or with MySQL 3, does it always use the current timestamp if not otherwise told?

    Any help would be greatly appreciated.

    thanks,
    json

  2. #2
    I code 4 beer ... bogu's Avatar
    Join Date
    Nov 2002
    Location
    Romania
    Posts
    1,743
    When u export db tables using phpmyadmin, u will notice this:
    Code:
    SQL export compatibility:
    from where u can choose for what type of DB server do u want to export, I create a table with one field, just like yours and tried to export it for more type of mysql vers, this is what its been returned:
    For mysql 3.23:
    PHP Code:
    CREATE TABLE `de_sters` (
      `
    timetimestamp NULL
    TYPE=MyISAM
    For mysql 4.0, because is a big difference between 4.0 and 4.1:
    PHP Code:
    CREATE TABLE `de_sters` (
      `
    timetimestamp NULL
    TYPE=MyISAM
    For mysql 4.4.2 and I think its working from mysql 4.1 and above:
    PHP Code:
    CREATE TABLE `de_sters` (
      `
    timetimestamp NULL default CURRENT_TIMESTAMP
    ENGINE=MyISAM DEFAULT CHARSET=latin1
    So that syntax is working only from mysql 4.1 above ...
    /**
    * The answer is so obvious, duh!
    * It's like, whatever ...
    *
    * If your problem has been solved, PLEASE click the RESOLVED LINK under "Thread Tools"
    */

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •