1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to organize (update/delete) data in databases (general question)

Discussion in 'Databases' started by iago111, Apr 23, 2020.

  1. #1
    Hello, I'm programming with HTML, PHP, JS, but I'm not really familar with databases. (mySQL in this case)

    E.g. I have written an editor for textemplates. Now, I have created some dummy templates, however I want to work with my real templates from work, (JSON export files). Can I just overwrite the database (import the files, make a backup before), or do I create a new database? How do you usually hande this? Thanks!
     
    iago111, Apr 23, 2020 IP
  2. sarahk

    sarahk iTamer Staff

    Messages:
    28,494
    Likes Received:
    4,457
    Best Answers:
    123
    Trophy Points:
    665
    #2
    It all depends on what you're doing and I'm not quite understanding what you want to do with those json files.

    You can delete all the records from your tables and reimport if you want to get a clean copy of the data - and that's something that happens a lot in development projects.
     
    sarahk, Apr 23, 2020 IP
  3. iago111

    iago111 Member

    Messages:
    99
    Likes Received:
    4
    Best Answers:
    1
    Trophy Points:
    33
    #3
    I can Download JSON files at work, I don't have access to the database. Does this also happen a lot in dev projects, that JSON or xml is used in order to backup data?
     
    iago111, Apr 23, 2020 IP
  4. sarahk

    sarahk iTamer Staff

    Messages:
    28,494
    Likes Received:
    4,457
    Best Answers:
    123
    Trophy Points:
    665
    #4
    I don't know if that's normal but if you're trying to upskill then you'd get some good practice writing scripts to json_decode the files and save each row in the database. You could then write pages to display the information, and forms to edit it and save the result.
     
    sarahk, Apr 23, 2020 IP