Hello,
I have a problem inserting many record at the same time and in the same client. The problem is that the system save the first record, and then repeat the values of the first record in the next one.
Another strange thing is that if I test the application in a intranet (with the server and client in the same network) the application works well.
In other word, it seems that the processing time of inserting records is slower than the processing time of the code.
If this analysis is right, is there some function stopping the code during insertion process in the db? or anything else ?
I'm sorry in advance if this problem is stupid or is not properly related with php !
Below you'll find an extract of the code about the insertion
Thanks
Paolo
Function saveanswer($numsid,$idrisp,$risp)
{
$q="INSERT INTO advrisposte ";
$q=$q . "(sid,id_risposta,risposta) ";
$q=$q . "VALUES ";
$q=$q . "('$numsid','$idrisp','$risp') ";
return $q;
}
$conn = &ADONewConnection('mysql'); # create a connection
$conn->Connect('host','root','pw','db');# connect to MySQL
$query=saveanswer($numsid,'a1',$a1);
$rs=$conn->Execute($query) or DIE($conn->ErrorMsg());
......
......
$rs=$conn->Execute($query) or DIE($conn->ErrorMsg());
$query=saveanswer($numsid,'e20',$e20);
$rs=$conn->Execute($query) or DIE($conn->ErrorMsg());
$conn->Close();