Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
1.2.5.5 - check-in.php - SQL error upon check-in
#1
Code:
Index: check-in.php
===================================================================
--- check-in.php    (revision 658)
+++ check-in.php    (working copy)
@@ -219,7 +219,7 @@
        $result = mysql_query($query, $GLOBALS['connection']) or die ("Error in query: $query. " . mysql_error());
        list($username) = mysql_fetch_row($result);
        // update revision log
-        $query = "UPDATE {$GLOBALS['CONFIG']['db_prefix']}log set revision={($lrevision_num - 1)} WHERE id = {$_POST['id']} and revision = 'current'";
+        $query = "UPDATE {$GLOBALS['CONFIG']['db_prefix']}log set revision='($lrevision_num - 1)' WHERE id = {$_POST['id']} and revision = 'current'";
        mysql_query($query, $GLOBALS['connection']) or die ("Error in query: $query. " . mysql_error());
        $query = "INSERT INTO {$GLOBALS['CONFIG']['db_prefix']}log (id, modified_on, modified_by, note, revision) VALUES('$_POST[id]', NOW(), '" . addslashes($username) . "', '". addslashes($_POST['note']) ."', 'current')";
        $result = mysql_query($query, $GLOBALS['connection']) or die ("Error in query: $query. " . mysql_error());


Forum Jump:


Users browsing this thread: 1 Guest(s)