I'm relatively new to web programming. I hope this one is easy. I've got a server app running that's monitoring a SQL table. Whenever an integer field turns positive, the app reads the rest of the row and fills in a long text field in the same record. I've now got a php script that sets the int field, and needs to wait until the app sets the field back to zero and then read the text field and echo it back to the remote user. I tried this (odbc):
$processed = 0;
while ( !$processed )
{
$rs = odbc_exec( $conn, $sql );
odbc_fetch_row($rs);
$processed = odbc_result( $rs, "Processed");
$output = odbc_result( $rs,"OutputSpec");
}
I takes about 5 sec. to finish. Too slow. I put a counter in and it takes ~10000 iterations for 'processed' to change. I know my server app changes the field instantaneously. Similar result in the SqlServer. There must be something delaying the commit or something?