1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

SQL Mapping

Discussion in 'computers, web and general tech' started by Fingers, Sep 13, 2017.

  1. Fingers

    Fingers From Tuscany SE22

    Hi all,

    I have a Joomla CMS set up which I am trying to upgrade. On the old website users had to register, I used a component called Extended Reg for this which is now defunct but need to get all the data over to a new system and component that will handle this.

    Am I right in thinking that I set up the registration fields in the new component, then map the entries from the old database fields to the new database fields? Any tips to make this process less painful?
  2. Fingers

    Fingers From Tuscany SE22

    OK so I have run this query as I want to add some columns from another table to this one

    INSERT INTO josya_acymailing_subscriber(`firstname`, `surname`)

    But get the error

    SQL query: [​IMG]

    INSERT INTO josya_acymailing_subscriber(`firstname`, `surname`)

    MySQL said: [​IMG]

    #1062 - Duplicate entry '' for key 'email'

    Any ideas? i have not even tried to copy the email field
  3. joustmaster

    joustmaster offcumdun

    your images aren't loading.
  4. Fingers

    Fingers From Tuscany SE22

    Hi that is because the whole thing is cut and pasted, the images are just icons
  5. joustmaster

    joustmaster offcumdun


    Can you desc the table josya_acymailing_subscriber?

    Sounds like email is a required, and unique, field.
  6. Fingers

    Fingers From Tuscany SE22

    OK a brief description, I was using a Joomla component for signing up to some mailing software. That software is no longer made so I need to get teh information into the database of the new software. That table above is the new software. the thing is, as a test I only tried to do the first name and last name columns so I am not trying to insert another email entry in there
  7. joustmaster

    joustmaster offcumdun

    but if the table requires an email address then it won't let you add without one.
  8. Fingers

    Fingers From Tuscany SE22

    Ah, should I try adding email address, first name, last name? Have to go out shortly so if this is the way forward I will try it later. I was pretty sure that the unique user ID was the key but maybe not.
  9. joustmaster

    joustmaster offcumdun

    maybe... thats what the error seems to suggest.
    the command"
    describe josya_acymailing_subscriber;
    should tell you what you need to include.
  10. Fingers

    Fingers From Tuscany SE22

    Cheers, here it is

  11. mauvais

    mauvais change has become unavoidable

    What about the old table that you're importing from - can you post that?


    The bit in bold is correct, although it's not clear what the cut-off 'MUL' is in the picture above.
  12. salem

    salem Well-Known Member

    As you're using PHPmyadmin you should be able to export/import CSV files. This might be easier then mucking around with SQL queries and you can open the exported file in a spreadsheet to get your data in order and then import that.

    Tables/users - Joomla! Documentation - seems to tell us which fields are needed for the users table - there are a couple of linked fields like usertype though so using a dedicated import module might be a better idea then modifying the table directly.
  13. Fingers

    Fingers From Tuscany SE22

    here you go mauvais - The describe of the old table

  14. DogorKat?

    DogorKat? /w00t

    Looks like the table you are trying to insert into has email as a unique key. So each record must have an email (it can't be NULL) and you cannot use the same email twice.
    The MULs are non-unique keys - the same value can be entered many times.
    sim667 likes this.

Share This Page