]> git.mxchange.org Git - mailer.git/blobdiff - inc/mysql-manager.php
Rewrote 'we' word a little, rewrote mail order to use SQL_INSERTID() instead of anoth...
[mailer.git] / inc / mysql-manager.php
index a21023e06e62be0ddedacffaf00d1225d36f3afc..0513795fb2c3df80a613772120c50b56a8ce684e 100644 (file)
@@ -111,7 +111,7 @@ function addYouAreHereLink ($accessLevel, $FQFN, $return = false) {
                // Get access level from it
                $modCheck = getModuleFromFileName($file, $accessLevel);
 
-               // Do we have admin? Then display all
+               // Is there admin? Then display all
                $ADD = " AND `visible`='Y' AND `locked`='N'";
                if (isAdmin()) {
                        // Display all!
@@ -258,7 +258,7 @@ ORDER BY
                                        $content['action']
                                ), __FUNCTION__, __LINE__);
 
-                       // Do we have some entries?
+                       // Are there some entries?
                        if (!SQL_HASZERONUMS($result_sub)) {
                                // Init counter
                                $count = '0';
@@ -506,7 +506,7 @@ function fetchUserData ($value, $column = 'userid') {
                        $value
                ), __FUNCTION__, __LINE__);
 
-       // Do we have a record?
+       // Is there a record?
        if (SQL_NUMROWS($result) == 1) {
                // Load data from cookies
                $data = SQL_FETCHARRAY($result);
@@ -591,7 +591,7 @@ function isAdmin () {
                return false;
        } // END - if
 
-       // Do we have cache?
+       // Is there cache?
        if (!isset($GLOBALS[__FUNCTION__][$adminId])) {
                // Init it with failed
                $GLOBALS[__FUNCTION__][$adminId] = false;
@@ -896,7 +896,7 @@ function getPaymentData ($paymentsId, $lookFor = 'price') {
        // Default value...
        $data[$lookFor] = NULL;
 
-       // Do we have cache?
+       // Is there cache?
        if (isset($GLOBALS['cache_array']['payments'][$paymentsId]['id'])) {
                // Use it if found to save SQL queries
                $data[$lookFor] = $GLOBALS['cache_array']['payments'][$lookFor][$paymentsId];
@@ -1101,7 +1101,7 @@ function getAdminId ($adminLogin) {
                $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_admins` WHERE `login`='%s' LIMIT 1",
                        array($adminLogin), __FUNCTION__, __LINE__);
 
-               // Do we have an entry?
+               // Is there an entry?
                if (SQL_NUMROWS($result) == 1) {
                        // Get it
                        $data = SQL_FETCHARRAY($result);
@@ -1120,7 +1120,7 @@ function getCurrentAdminId () {
        // Log debug message
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'called!');
 
-       // Do we have cache?
+       // Is there cache?
        if (!isset($GLOBALS['current_admin_id'])) {
                // Get the admin login from session
                $adminId = getSession('admin_id');
@@ -1155,7 +1155,7 @@ function getAdminHash ($adminId) {
                $result = SQL_QUERY_ESC("SELECT `password` FROM `{?_MYSQL_PREFIX?}_admins` WHERE `id`=%s LIMIT 1",
                        array(bigintval($adminId)), __FUNCTION__, __LINE__);
 
-               // Do we have an entry?
+               // Is there an entry?
                if (SQL_NUMROWS($result) == 1) {
                        // Fetch data
                        $data = SQL_FETCHARRAY($result);
@@ -1258,7 +1258,7 @@ function getAdminDefaultAcl ($adminId) {
                $result_admin_id = SQL_QUERY_ESC("SELECT `default_acl` FROM `{?_MYSQL_PREFIX?}_admins` WHERE `id`=%s LIMIT 1",
                        array(bigintval($adminId)), __FUNCTION__, __LINE__);
 
-               // Do we have an entry?
+               // Is there an entry?
                if (SQL_NUMROWS($result_admin_id) == 1) {
                        // Fetch data
                        $data = SQL_FETCHARRAY($result_admin_id);
@@ -1295,7 +1295,7 @@ function getAdminMenuMode ($adminId) {
                $result_admin_id = SQL_QUERY_ESC("SELECT `la_mode` FROM `{?_MYSQL_PREFIX?}_admins` WHERE `id`=%s LIMIT 1",
                        array(bigintval($adminId)), __FUNCTION__, __LINE__);
 
-               // Do we have an entry?
+               // Is there an entry?
                if (SQL_NUMROWS($result_admin_id) == 1) {
                        // Fetch data
                        $data = SQL_FETCHARRAY($result_admin_id);
@@ -1362,7 +1362,7 @@ function generateOptions ($table, $key, $value, $default = '', $extra = '', $whe
                                $value
                        ), __FUNCTION__, __LINE__);
 
-               // Do we have rows?
+               // Is there rows?
                if (!SQL_HASZERONUMS($result)) {
                        // Found data so add them as OPTION lines
                        while ($content = SQL_FETCHARRAY($result)) {
@@ -1428,7 +1428,7 @@ WHERE
 LIMIT 1",
                array(bigintval($userid)), __FUNCTION__, __LINE__);
 
-       // Do we have an entry?
+       // Is there an entry?
        if (SQL_NUMROWS($result) == 1) {
                // Save his points to add them to the jackpot
                $data = SQL_FETCHARRAY($result);
@@ -1526,7 +1526,7 @@ function generateCategoryOptionsList ($mode, $userid = NULL) {
        $result = SQL_QUERY('SELECT `id`,`cat` FROM `{?_MYSQL_PREFIX?}_cats`' . $whereStatement . ' ORDER BY `sort` ASC',
                __FUNCTION__, __LINE__);
 
-       // Do we have entries?
+       // Are there entries?
        if (!SQL_HASZERONUMS($result)) {
                // ... and begin loading stuff
                while ($content = SQL_FETCHARRAY($result)) {
@@ -1818,7 +1818,7 @@ function doGenericListEntries ($tableTemplate, $rowTemplate, $noEntryMessageId,
        // Remove last commata and add FROM statement
        $SQL .= ' FROM `{?_MYSQL_PREFIX?}_' . $tableName[0] . '`';
 
-       // Do we have entries from whereColumns to add?
+       // Are there entries from whereColumns to add?
        if (count($whereColumns) > 0) {
                // Then add these as well
                if (count($whereColumns) == 1) {
@@ -1863,7 +1863,7 @@ function doGenericListEntries ($tableTemplate, $rowTemplate, $noEntryMessageId,
                }
        } // END - if
 
-       // Do we have entries from orderByColumns to add?
+       // Are there entries from orderByColumns to add?
        if (count($orderByColumns) > 0) {
                // Add them as well
                $SQL .= ' ORDER BY ';
@@ -1895,7 +1895,7 @@ function doListEntries ($SQL, $tableTemplate, $noEntryMessageId, $rowTemplate, $
        // Run the SQL query
        $result = SQL_QUERY($SQL, __FUNCTION__, __LINE__);
 
-       // Do we have some URLs left?
+       // Are there some URLs left?
        if (!SQL_HASZERONUMS($result)) {
                // List all URLs
                $OUT = '';
@@ -1905,7 +1905,7 @@ function doListEntries ($SQL, $tableTemplate, $noEntryMessageId, $rowTemplate, $
                                // Fill the callback arguments
                                $args = array($content[$columnName]);
 
-                               // Do we have more to add?
+                               // Is there more to add?
                                if (isset($extraParameters[$columnName])) {
                                        // Add them as well
                                        $args = merge_array($args, $extraParameters[$columnName]);
@@ -1951,7 +1951,7 @@ function doGenericAddEntries ($tableName, $columns = array(), $filterFunctions =
        // Default is that all went fine
        $GLOBALS['__XML_PARSE_RESULT'] = true;
 
-       // Do we have "time columns"?
+       // Is there "time columns"?
        if (count($timeColumns) > 0) {
                // Then "walk" through all entries
                foreach ($timeColumns as $column) {