Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2009
    Posts
    33

    Unanswered: MYSQL Create Table Syntax

    Hi, I'm trying to create a table, however it seems the syntax is incorrect. Am I missing something obvious?

    Code:
    DROP TABLE IF EXISTS `jos_keyword_stats`;
    
    CREATE TABLE `jos_keyword_stats` (
    `KeyID` INT NOT NULL ,
    `Date` DATE NOT NULL ,
    `Time` TIME NOT NULL ,
    `Location` MEDIUMTEXT NOT NULL ,
    `UserIP` TEXT NOT NULL ,
    `UserAgent` TEXT NOT NULL ,
    `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY
    ) ENGINE = MYISAM;

  2. #2
    Join Date
    Mar 2004
    Posts
    480
    Nothing incorrect with that syntax. I'd say TEXT is overkill for an IP address field, but other than that the table creates just fine.

    how are you trying to create this? via mysql client or a front end application?

  3. #3
    Join Date
    Jun 2009
    Posts
    33
    actually I've just created my first Joomla component. In order to finalize it I need to include a "install.sql" file which create all necessary tables. I continue to receive the following error message though:

    Component Install: SQL error or missing or unreadable SQL file. DB function reports no errors
    Install Component Error

    I was pretty sure that the problem was in the MYSQL statement, however I guess that's not the case.

  4. #4
    Join Date
    Jun 2009
    Posts
    33
    wish there was a way to mark this as solved. Thanks for your help though.

Posting Permissions

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