Hi,
I select the values from a table and display them, than insert the returned values in another table. I am using a function to insert the values. The function is insertvalues($rows). So my query is:
SELECT (row1, row2) FROM (mytable) WHERE id=x;
WHILE (something) {
echo "rows";
insertvalues($rows);
}
This takes 4 seconds to load. But if I dont use the function and insert the values right from there itself, the page takes 1 second to load. I always thought that using a function to breakdown multiple tasks is advisable. But its taking a lot of time. Should I continue to insert the values from the while loop itself?