Hi Members,
I want to copy 15 thousand records from one table to another in the same Database. If I create a button within PHPRunner to do this job, it takes around 3.5 minutes. If I create separate script to do this job, it takes about 30 seconds.
In PHPRunner I did as follow:
- Create a custom button
- Insert the following script into "Server" tab
$results = CustomQuery("SELECT LName FROM Member WHERE ID<=15000");
while($data = db_fetch_array($results)){
CustomQuery("INSERT INTO MBackup (LName)
VALUES ('$data[LName]')");
My own script as follow:
$sql = "SELECT Lname FROM Memeber WHERE ID<=15000";
$results = mssql_query ( $sql, $conn );
while ( $data = mssql_fetch_array ( $results ) )
{
mssql_query("INSERT INTO MBackup (LName)
VALUES ('$data[LName]')");
}
anyone knows why PHPRunner button goes slow or anyway to improve it?
Many thanks
<img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=16749&image=1&table=forumtopics' class='bbc_emoticon' alt=':wacko:' />