.USERS. replacement in 2 Moons 1.8git

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • .USERS. replacement in 2 Moons 1.8git

      Derzeit versuche ich einen Mod wieder lauffähig zu bekommen, allerdings suche ich nun schon seit einiger Zeit nach der passenden Variable für ".USERS." in der 1.8Git.

      Hoffe mir kann da jemand weiterhelfen
    • replace .USERS. by %%USERS%%
      I remain at your disposal on the forum for any questions or help.

      A help is of course not a creation of a mod



      -------------------------------------------------------
      My personal game
      weedland - Comming Soon
    • I think the problem is the complete query:

      PHP Source Code

      1. ($GLOBALS['DATABASE']->countquery("SELECT (SELECT COUNT(*) FROM ".USERS." WHERE `universe` = '".$UNI."' AND `username` = '".$GLOBALS['DATABASE']->sql_escape($UserName)."') + (SELECT COUNT(*) FROM ".USERS_VALID." WHERE `universe` = '".$UNI."' AND `username` = '".$GLOBALS['DATABASE']->sql_escape($UserName)."')") != 0);
      how to replace the $globals i know but the probelm is to rebuild the complete Query. Ive tried the %%Variable%% but the query wont work correct.
    • Yes you had to change the entire sql query with the new 1.8 queries.
      I remain at your disposal on the forum for any questions or help.

      A help is of course not a creation of a mod



      -------------------------------------------------------
      My personal game
      weedland - Comming Soon
    • I'll do it to you on my way home
      I remain at your disposal on the forum for any questions or help.

      A help is of course not a creation of a mod



      -------------------------------------------------------
      My personal game
      weedland - Comming Soon
    • PHP Source Code

      1. $db = Database::get();
      2. $sql = "SELECT (
      3. SELECT COUNT(*)
      4. FROM %%USERS%%
      5. WHERE universe = :universe
      6. AND username = :userName
      7. ) + (
      8. SELECT COUNT(*)
      9. FROM %%USERS_VALID%%
      10. WHERE universe = :universe
      11. AND username = :userName
      12. ) as count;";
      13. $countUsername = $db->selectSingle($sql, array(
      14. ':universe' => Universe::current(),
      15. ':userName' => $userName,
      16. ), 'count');
      Display All
      I remain at your disposal on the forum for any questions or help.

      A help is of course not a creation of a mod



      -------------------------------------------------------
      My personal game
      weedland - Comming Soon