--- branches/paul/link.phtml 2003/12/05 18:40:01 3
+++ branches/paul/link.phtml 2004/03/18 19:24:54 67
@@ -25,8 +25,8 @@
. " AND element_id = "
. $element_id;
- $rs = mysql_query($sql, $con);
- $row = mysql_fetch_array($rs);
+ $rs = mysql_tryquery($sql);
+ $row = mysql_fetch_array($rs, MYSQL_ASSOC);
// Resource
$resource_id = $row["resource_id"];
@@ -100,17 +100,7 @@
. ", now(), '"
. $user_ip
. "')";
-
- if (!mysql_query($sql, $con)){
- sql_err($con);
- mysql_query ("UNLOCK TABLES", $con);
- bailout();
- } // bad write
- else {
- mysql_query("UNLOCK TABLES", $con);
-
- } // good write to the stats table
-
+ mysql_tryquery($sql);
// Redirect the user
header("Location: " . $redirect_url);
@@ -118,4 +108,4 @@
else printf("Resource not found...");
-?>
+?>
\ No newline at end of file