1

I have created a script that will create a sql backup file, but after executing that backup file I am getting (error 150). Its because the sql tables contains foreign key reference and those are written in sequential order. How to correct the order of writing of sql file through php?

KunalC
  • 11
  • 3
  • You can enclose it in a transaction... have a look at this http://stackoverflow.com/questions/2708237/php-mysql-transactions-examples – malta Feb 08 '14 at 12:18
  • [related: (temporarily) skip foreign key checks](http://stackoverflow.com/questions/15938786/disabling-foreign-key-checks-on-the-command-line). – Wrikken Feb 08 '14 at 12:20

0 Answers0