Question: Arrange Database Tables And Data

Arrange Database Tables And Data

hi, I installed my application and use it for two weeks. with this link http://localhost/app1. With database named db1 I arrived to total of sales equal to 3000$ I thought that I have mista

MB

Mehdi boudhir

Asked
hi,
I installed my application and use it for two weeks. with this link http://localhost/app1.
With database named db1
I arrived to total of sales equal to 3000$
I thought that I have mistake then I created a new database with the same products and settings of app1 with null sales and payments
This link is
http://localhost/app2
With new database named db2(the same old one but I reset sales and payments, I deleted it all)
I arrived to total of sales equal to 1100$.
Now
I tried to merge the two database to get all of my work from beginning
But when I tried to import the new or the old database (tables)
I get an sql error duplicate entry.
I tried to uncheck foreign key checking or run the sql code but it didn't success.
How can I do this work
Thank you
  • MS

    Mian Saleem

    Answered
    Hello,

    Duplicate entry might be due to sane id. You are trying to insert data with id but that id already exists in you database.

    Thank you
  • MB

    Mehdi boudhir

    Answered
    How can I pass this problem?
    I tried to export sales to excel file then import it as csv file but it can't work.
    regards
  • MS

    Mian Saleem

    Answered
    Hello,

    I am not sure as I have limited knowledge of direct db editing. Please check with database admin. What I think, I already told you. We can't help if you are editing db and arranging data. We can. help if you have any issue with item.

    Thank you
  • MB

    Mehdi boudhir

    Answered
    this is issue with item. I tried to simplify it to understand it another one.
    another way:
    Importing exported sales file (excel) by this system didn't work correctly.
  • MS

    Mian Saleem

    Answered
    Hello,

    We don't recommend editing database directly. If you have knowledge and know what you doing, we don't have objection but we can't offer support for this. I hope, you understand what I am trying to say. We don't have any database admin in out team.

    Thank you
  • MB

    Mehdi boudhir

    Answered
    ok thank you,
    But when I use database n 1 with my system for 1 month.
    I created a new fresh database that i connected my system and hold the first one.
    I used it for the 15 days after.
    Now I need to add all the old data from the first one (transaction of the last month) to the second database.
    How to do that?
  • MS

    Mian Saleem

    Answered
    Hello,

    I have already told you my knowledge of database are limited. As I know, you can't because both will have same primary ids and you can't have duplicate ids. But you can refer to your database admin fro more info.

    Thank you
  • Login to Reply