--- trunk/link.phtml 2004/03/04 22:43:50 42 +++ trunk/link.phtml 2004/03/18 20:33:37 72 @@ -25,8 +25,8 @@ . " AND element_id = " . $element_id; - $rs = xx_query($sql, $con); - $row = xx_fetch_array($rs); + $rs = xx_tryquery($sql); + $row = xx_fetch_array($rs, xx_ASSOC); // Resource $resource_id = $row["resource_id"]; @@ -100,17 +100,7 @@ . ", now(), '" . $user_ip . "')"; - - if (!xx_query($sql, $con)){ - sql_err($con); - xx_query ("UNLOCK TABLES", $con); - bailout(); - } // bad write - else { - xx_query("UNLOCK TABLES", $con); - - } // good write to the stats table - + xx_tryquery($sql); // Redirect the user header("Location: " . $redirect_url); @@ -118,4 +108,4 @@ else printf("Resource not found..."); -?> +?> \ No newline at end of file