hello I have some queries in a script on the following environment:
Linux Debian Apache 1.3.19 Patched Ben Php 4.0.6 patched UnixODBC driver manager latest version (installed yesterday) freeTDS driver DMBS -> MicrosoftSQL 7. I have a few queries: line 15 -> connection string line 20: qry nr. 1 -> SELECT line 25 qry nr. 2 -> SELECT line 30 qry nr. 3 -> UPDATE The SELECTs do work. The UPDATE doesn't, THE BROWSER (Mozilla) goes into a looping cicle (re-calling the same page with no end) If I move the UPDATE qry UPDATE up to line 16 immediately after the connection, then it works correctly. Data are updated So, why??? The code sample is as follows -> connection string is here <--- $SQL_R_AVAILABLE = "SELECT top 1 etc etc"; $res_r_avail = @odbc_exec( $conn, $SQL_R_AVAILABLE ); if ( $res_r_avail ) { odbc_fetch_row($res_r_avail); $sendavailable = @odbc_result($res_r_avail, "sendavailable"); $ttoday = @odbc_result($res_r_avail, "ttoday"); odbc_free_result($res_r_avail); if ( $ttoday == "" ) { $sql = "UPDATE tableT SET ttoday=getdate() where condition"; $resUpd = @odbc_exec( $conn, $sql ); ^^^^^ THIS QUERY MAKES THE SCRIPT (BROWSER) GO IN A LOOP } } ////////////////////////////////////// I maybe suspect it's because the result is occupied by the select above but ... don't know what to put before UPDATE to free the resources. odbc_free_result doesn't seem to work.. Thank you all Nicola Delbono /////////////////////////////////////////// Il notiziario dei notiziari http://www.notiziarioweb.it/ /////////////////////////////////////////// www.smscitta.com | www.musicalbox.it www.filosofo.it | www.bollicine.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php