userid shall be NULL by default everywhere possible
authorRoland Häder <roland@mxchange.org>
Thu, 15 Sep 2011 15:44:42 +0000 (15:44 +0000)
committerRoland Häder <roland@mxchange.org>
Thu, 15 Sep 2011 15:44:42 +0000 (15:44 +0000)
inc/db/lib-mysql3.php
install/tables.sql

index c3369299057b789583e7a10acf90de706c26ac60..1f4fb3cdbdd4fd745f1506d169158cad125ef27e 100644 (file)
@@ -90,8 +90,7 @@ function SQL_QUERY ($sqlString, $F, $L, $enableCodes = true) {
        // Run SQL command
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'F=' . basename($F) . ',L=' . $L . ',sql=' . $GLOBALS['last_sql']);
        $result = mysql_query($GLOBALS['last_sql'], SQL_GET_LINK())
        // Run SQL command
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'F=' . basename($F) . ',L=' . $L . ',sql=' . $GLOBALS['last_sql']);
        $result = mysql_query($GLOBALS['last_sql'], SQL_GET_LINK())
-               or debug_report_bug($F, $L, 'file='. basename($F) . ',line=' . $L . ':mysql_error()=' . mysql_error() . "\n".
-'Query string:' . $GLOBALS['last_sql']);
+               or debug_report_bug($F, $L, 'file='. basename($F) . ',line=' . $L . ':mysql_error()=' . mysql_error() . ',last_query=' . $GLOBALS['last_sql']);
        //* DEBUG: */ logDebugMessage($F, $L, 'sql=' . $GLOBALS['last_sql'] . ',affected=' . SQL_AFFECTEDROWS() . ',numRows='.(is_resource($result) ? SQL_NUMROWS($result) : gettype($result)));
 
        // Calculate query time
        //* DEBUG: */ logDebugMessage($F, $L, 'sql=' . $GLOBALS['last_sql'] . ',affected=' . SQL_AFFECTEDROWS() . ',numRows='.(is_resource($result) ? SQL_NUMROWS($result) : gettype($result)));
 
        // Calculate query time
index 9a177b93d37e1b031418b9dfdadfa9340fd0167f..ee3a53a11ec65cc5200342a8812aa073bde21eda 100644 (file)
@@ -175,7 +175,7 @@ DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_task_system`;
 CREATE TABLE `{?_MYSQL_PREFIX?}_task_system` (
   `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
   `assigned_admin` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 CREATE TABLE `{?_MYSQL_PREFIX?}_task_system` (
   `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
   `assigned_admin` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
-  `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+  `userid` BIGINT(20) UNSIGNED NULL DEFAULT NULL,
   `status` ENUM('NEW','OPEN','SOLVED','CLOSED','DELETED') NOT NULL DEFAULT 'NEW',
   `task_type` VARCHAR(255)  NOT NULL DEFAULT 'FIRST_USER',
   `subject` VARCHAR(255) NOT NULL DEFAULT '',
   `status` ENUM('NEW','OPEN','SOLVED','CLOSED','DELETED') NOT NULL DEFAULT 'NEW',
   `task_type` VARCHAR(255)  NOT NULL DEFAULT 'FIRST_USER',
   `subject` VARCHAR(255) NOT NULL DEFAULT '',