Ver original$query="exec [BD1].[dbo].[Test] 2, '".$ip."','','Successful'"; $r3=odbc_exec($connection,$query); while(odbc_fetch_row($r3)){ $TotalS =odbc_result($r3,"Total"); }