Ron Borkent
|
Posted: 01/27/2002, 1:36 PM |
|
I'm having some problems with an after insert event(PHP).
I've got a record that is inserted into table A. After this is done some records in table B have to be updated. This is my code in the after insert from event:
$SQL1="update fzreiskosten set fzakkoord=1 where Declaratie_nr=" .$fldDeclaratie_nr;
$result1=mysql_query($SQL1);
this should update severaL records in table B but it only updates 1 and then stops.
I've tried the next:
while($SQL1="update fzreiskosten set fzakkoord=1 where Declaratie_nr=" .$fldDeclaratie_nr)
{
$result1=mysql_query($SQL1);
}
when this is executed the browser shows page loading and after 30 sec. I get an php error because max execution time has been reached. When I check table B the records have been updated. So now I got code that works but makes php hang.
Haven't got a clue what is going wrong so please, please, pretty please HELP!!!
Ron
|
|
|
Nicole
|
Posted: 01/28/2002, 5:03 AM |
|
Ron,
try to use CC query function:
$sSQL1 ="update fzreiskosten set fzakkoord=1 where Declaratie_nr=" .$fldDeclaratie_nr;
$db->query($sSQL1);
|
|
|
Ron Borkent
|
Posted: 01/28/2002, 6:01 AM |
|
Thnx Nicole, once again you've been a life saver.
Ron
|
|
|
|
|