note
Corion
<p>Depending on (the version of) your database driver, it might be that your database driver does not like more than one statement handle being active at the same time. In your case, that would be <c>$searchSQL</c> during the loop and in that loop the <c>$insertSQL</c>.</p>
<p>A workaround could be to first fetch all items into an array and then execute the insert for each element of that array.</p>
<p>In my experience, at least SQLite had this behaviour of not really wanting more than one active statement handle.</p>
1100999
1100999