]> git.mxchange.org Git - mailer.git/blobdiff - inc/db/lib-mysql3.php
Rewrote 'we' word a little, rewrote mail order to use SQL_INSERTID() instead of anoth...
[mailer.git] / inc / db / lib-mysql3.php
index 1da0f27c5a2befb19ff39dbd25d57bdc75fd0f66..c5f502723f85aac5bd43a8d7ece643439bbcb9cf 100644 (file)
@@ -42,7 +42,7 @@ if (!defined('__SECURITY')) {
 
 // SQL queries
 function SQL_QUERY ($sqlString, $F, $L, $enableCodes = true) {
-       // Do we have cache?
+       // Is there cache?
        if (!isset($GLOBALS[__FUNCTION__][$sqlString])) {
                //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called: ' . $sqlString);
 
@@ -305,7 +305,7 @@ function SQL_INSERTID () {
 
 // Escape a string for the database
 function SQL_ESCAPE ($str, $secureString = true, $strip = true) {
-       // Do we have cache?
+       // Is there cache?
        if (!isset($GLOBALS['sql_escapes']['' . $str . ''])) {
                // Prepare the string here
                $str = SQL_PREPARE_SQL_STRING($str);
@@ -423,7 +423,7 @@ function SQL_ALTER_TABLE ($sql, $F, $L, $enableCodes = true) {
                        // Debug log
                        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'columnName=' . $columnName . ',idx=' . $idx . ',sql=' . $sql . ',hasZeroNums=' . intval(ifSqlColumnExists($tableName, $columnName)));
 
-                       // Do we have no entry on ADD or an entry on DROP/CHANGE?
+                       // Is there no entry on ADD or an entry on DROP/CHANGE?
                        if (((!ifSqlColumnExists($tableName, $columnName)) && (isInString('ADD', $sql))) || ((ifSqlColumnExists($tableName, $columnName)) && ((isInString('DROP', $sql)) || ((isInString('CHANGE', $sql)) && ($idx == 4) && ((!ifSqlColumnExists($tableName, $tableArray[5])) || ($columnName == $tableArray[5])))))) {
                                // Do the query
                                //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Executing: ' . $sql);
@@ -531,7 +531,7 @@ function SQL_SET_LINK ($link) {
 
 // Checks if the link is up
 function SQL_IS_LINK_UP () {
-       // Do we have cached this?
+       // Is there cached this?
        if (!isset($GLOBALS['is_sql_link_up'])) {
                // Determine it
                $GLOBALS['is_sql_link_up'] = is_resource(SQL_GET_LINK());
@@ -578,7 +578,7 @@ function SQL_ERROR ($file, $line, $message) {
        // Remember plain error in last_sql_error
        $GLOBALS['last_sql_error'] = mysql_error();
 
-       // Do we have installation phase?
+       // Is there installation phase?
        if (isInstallationPhase()) {
                /*
                 * In installation phase, we don't want SQL errors abort e.g. connection
@@ -594,7 +594,7 @@ function SQL_ERROR ($file, $line, $message) {
 // Check if there is a SQL table created
 function ifSqlTableExists ($tableName) {
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'tableName=' . $tableName . ' - ENTERED!');
-       // Do we have cache?
+       // Is there cache?
        if (!isset($GLOBALS[__FUNCTION__][$tableName])) {
                // Check if the table is there
                $result = SQL_QUERY_ESC("SHOW TABLES FROM `{?__DB_NAME?}` WHERE `Tables_in_{?__DB_NAME?}`='{?_MYSQL_PREFIX?}_%s'",
@@ -613,7 +613,7 @@ function ifSqlTableExists ($tableName) {
 // Is a table column there?
 function ifSqlColumnExists ($tableName, $columnName) {
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'tableName=' . $tableName . ',columnName=' . $columnName . ' - ENTERED!');
-       // Do we have cache?
+       // Is there cache?
        if (!isset($GLOBALS[__FUNCTION__][$tableName][$columnName])) {
                // And column name as well
                $columnName = str_replace('`', '', $columnName);
@@ -641,7 +641,7 @@ function ifSqlColumnExists ($tableName, $columnName) {
 // Checks depending on the mode if the index is there
 function isSqlTableIndexFound ($tableName, $keyName) {
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'tableName=' . $tableName . ',columnName=' . $keyName . ' - ENTERED!');
-       // Do we have cache?
+       // Is there cache?
        if (!isset($GLOBALS[__FUNCTION__][$tableName][$keyName])) {
                // Show indexes
                $result = SQL_QUERY_ESC("SHOW INDEX FROM `%s`", array($tableName), __FUNCTION__, __LINE__);
@@ -686,7 +686,7 @@ function getArrayFromSupportedSqlEngines ($support = 'YES') {
        // This also worked, now we need to check if the selected database type is supported
        $result = SQL_QUERY('SHOW ENGINES', __FUNCTION__, __LINE__);
 
-       // Do we have entries? (Bad if not)
+       // Are there entries? (Bad if not)
        if (SQL_NUMROWS($result) > 0) {
                // Load all and check for active entries
                while ($content = SQL_FETCHARRAY($result)) {