Quote Originariamente inviata da serialkiller Visualizza il messaggio
Prepared statements allow you to make multiple similar queries more efficiently. You can prepare (for example) an insert statement, then loop over it with multiple bits of data and get a performance boost as the database has less work to do as it doesn't have to set it up each time.
Si però qui si parla della stessa query nel senso che prepari una singola query di inserimento e poi cicli sui parametri da inserire. Nel tuo caso cerchi di eseguire 2 query differenti.