Thanks everyone, but I already solved it. I lost all the pictures and I had to upload them again but I am done. I made a new install of prestashop. Then I deleted all the tables in the prestashop installation, then I imported the backed up database. I had to upload all product images individually but its working yeah. Make frequent backups of all files including MySQL database.