Results 1 to 4 of 4

Thread: Mysql: syntax

  1. #1
    Junior Member russellg's Avatar
    Join Date
    Mar 2006
    Posts
    28

    Default Mysql: syntax

    What is the syntax to rectify this error?
    Code:
    user error: Duplicate entry 'modules/playlist/playlist.module' for key 1
    query: INSERT INTO system (name, description, type, filename, status, throttle, bootstrap) VALUES ('playlist', 'Enables the creation of playlists, which contain audio tracks.', 'module', 'modules/playlist/playlist.module', 1, 1, 0) in /home/username/public_html/includes/database.mysql.inc on line 66.
    TIA

  2. #2
    Senior Member
    Join Date
    Mar 2004
    Location
    Australia
    Posts
    183

    Default

    By the looks of it, the the filename column has some kind of key on it (maybe a UNIQUE or PRIMARY key).

    In other words, only unique values are allowed in this field.

    try:
    Code:
    SELECT * FROM system WHERE filename='modules/playlist/playlist.module'
    That will tell you what other record also has the same data in the filename field.

    You will either have to delete this row, or change the database schema so that the filename column does not have to be unique.

  3. #3
    Junior Member
    Join Date
    Jan 2005
    Posts
    5

    Default

    Couldn't the key be on any of the fields, not just filename?

  4. #4
    Senior Member
    Join Date
    Mar 2004
    Location
    Australia
    Posts
    183

    Default

    Hi Cohesive,

    The error says "Duplicate entry 'modules/playlist/playlist.module' for key 1", which would mean that the field containing that data would be the duplicate.

    Looking at the SQL insert query, this entry is in the fourth field across, which corresponds to the filename column.

    Cheers,

    James

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
  •