How to reset row in PHP?

Do CPP programs have timeouts like PHP scripts do? I'm planning a 4m-row CRUD operation in MySQL. Any ideas?

  • Im gonna move 4 million rows from 1 MySQL database to another. Right now I use INSERT... SELECT syntax through a PHP script. I'm actually planning to move to CPP for this purpose just to get rid of memory problems as well as timeouts. But is it really worth it? Is there another way? Any ideas? Thanks!

  • Answer:

    If this is a one-time thing, then you should just dump the database to an sql file then simply insert it to the other database. More info: https://dev.mysql.com/doc/refman/5.0/en/mysqldump-sql-format.html I would personally write a bash(/php) script to automate the process by dumping the database to an sql file then inserting it to another database. The other solution would be to use set_time_limit method in PHP, as suggested by . Simply remove the execution timeout by copying this snippet to the beginning of your PHP script. set_time_limit(0);

Abdulaziz at Quora Visit the source

Was this solution helpful to you?

Other answers

You can disable the timeout for php. http://www.php.net/manual/en/function.set-time-limit.php

Sebastian Gorobievschi

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.