UserPunkte erweitert und jetzt sql fehler!!

Begonnen von Sascha1981, 07 Juli 2002, 14:17:43

⏪ vorheriges - nächstes ⏩

0 Mitglieder und 1 Gast betrachten dieses Thema.

Sascha1981

Hey @ll!!

Hab meine User punkte erweitert und jetzt bekomme ich folgende fehler meldung!!!!!

#####Fehler Meldung Anfang#############
error in sql-statement: mysql_query, err-no: 1054
qry: select count(gid) from nuke_nukebook where touser='Sascha'
description: Unknown column 'gid' in 'field list'

Warning: Supplied argument is not a valid MySQL result resource in /home/sites/site25/web/includes/sql_layer.php on line 355

error in sql-statement: mysql_fetch_array, err-no: 1054
description: Unknown column 'gid' in 'field list'

error in sql-statement: mysql_query, err-no: 1054
qry: select count(eid) from nuke_priv_msgs where informant='Sascha'
description: Unknown column 'eid' in 'field list'

Warning: Supplied argument is not a valid MySQL result resource in /home/sites/site25/web/includes/sql_layer.php on line 355

error in sql-statement: mysql_fetch_array, err-no: 1054
description: Unknown column 'eid' in 'field list'
#########Fehler meldung ende##########


#########auszug aus der userpoints.php anfang#######
if ($useuserpoints && $uname) {
# User, die nicht gezaehlt werden sollen
# Namen mit Komma trennen!
   $excludedusers ="Andi,Darkboy,FrankySZ";
# Punktezahlen definieren, um eine Kategorie auszulassen, 0 eingeben
# FAQ zu userpoints entsprechend anpassen!!
   $points_downloads1 = 5;   # Downloads
   $points_downloads2 = 2;   # Download Bewertungen
   $points_links1 = 5;   # Links
   $points_links2 = 2;   # Link Bewertungen
   $points_umfragen = 5;   # Umfragekommentare
   $points_artikel = 20;   # Beitrag schreiben
   $points_kommentare = 10;# Beitrag Kommentare
   $points_gb1 = 3;   # User Gaestebuch eigene Eintraege
   $points_gb2 = 2;   # User Gaestebuch eintragen
   $points_fposts = 10;   # Forumsbeitraege  !!!! XMB-Forum !!!!
   $points_fthreads = 15;   # Forumsbeitraege  !!!! XMB-Forum !!!!
   $points_kalender = 2;   # Kalenderbeitraege
   $points_private_Nachrichten = 2;   # Private Nachrichten

# ende Punktezahlen

   $exusers = explode (",", $excludedusers);            
   while (list($key, $val) = each($exusers)) {      
      if (strtolower($uname) == strtolower(trim($val))){
         $userishided = 1;
         sql_query("delete from ".$prefix."_userpoints where uid = '$uid' ", $dbi);
         break;
         }
      }
   if (!$userishided){
      # uid ermitteln
      $resultx=sql_query("select uid from ".$user_prefix."_users where uname='$uname'", $dbi);
      list($uid) = sql_fetch_row($resultx, $dbi);
      $userpoints=0;
      
      if ($points_downloads1) {# DownloadS
         $result = sql_query("select count(lid) from ".$prefix."_downloads_downloads where name='$uname'", $dbi);
         list($points) = sql_fetch_array($result, $dbi);
         $userpoints = $userpoints + ($points * $points_downloads1);
        }
      if ($points_downloads2) {# Download Bewertungen
         $result = sql_query("select count(ratingdbid) from ".$prefix."_downloads_votedata where ratinguser='$uname'", $dbi);
         list($points) = sql_fetch_array($result, $dbi);
         $userpoints = $userpoints + ($points * $points_downloads2);
         }
      if ($points_links1) {# Links
         $result = sql_query("select count(lid) from ".$prefix."_links_links where name='$uname'", $dbi);
         list($points) = sql_fetch_array($result, $dbi);
         $userpoints = $userpoints + ($points * $points_links1);
         }
      if ($points_links2) {# Link Bewertungen
         $result = sql_query("select count(ratingdbid) from ".$prefix."_links_votedata where ratinguser='$uname'", $dbi);
         list($points) = sql_fetch_array($result, $dbi);
         $userpoints = $userpoints + ($points * $points_links2);
        }
      if ($points_umfragen) {# Umfragekommentare
         $result = sql_query("select count(tid) from ".$prefix."_pollcomments where name='$uname'", $dbi);
         list($points) = sql_fetch_array($result, $dbi);
         $userpoints = $userpoints + ($points * $points_umfragen);
        }
      if ($points_artikel) {# Beitrag schreiben
         $result = sql_query("select count(sid) from ".$prefix."_stories where informant='$uname'", $dbi);
         list($points) = sql_fetch_array($result, $dbi);
         $userpoints = $userpoints + ($points * $points_artikel);
        }
      if ($points_kommentare) {# Beitrag Kommentare
         $result = sql_query("select count(tid) from ".$prefix."_comments where name='$uname'", $dbi);
         list($points) = sql_fetch_array($result, $dbi);
         $userpoints = $userpoints + ($points * $points_kommentare);
        }
      if ($points_gb1) {# Gaestebuch
         $result=sql_query("select count(gid) from ".$prefix."_nukebook where touser='$uname'", $dbi);
         list($points) = sql_fetch_array($result, $dbi);
         $userpoints = $userpoints + ($points * $points_gb1);
        }
      if ($points_gb2) {# User Gaestebuch eintragen
         $result=sql_query("select count(gid) from ".$prefix."_userguest where wer='$uname'", $dbi);
         list($points) = sql_fetch_array($result, $dbi);
         $userpoints = $userpoints + ($points * $points_gb2);
        }
      if ($points_fthreads) {# Forumsbeitraege  !!!! XMB-Forum !!!!
         $result= sql_query("select count(tid) from ".$prefix."_xmb_threads where author='$uname'", $dbi);
         list($points) = sql_fetch_array($result, $dbi);
         $userpoints = $userpoints + ($points * $points_fthreads);
         }
      if ($points_fposts) {# Forumsbeitraege  !!!! XMB-Forum !!!!
         $result= sql_query("select count(pid) from ".$prefix."_xmb_posts where author='$uname'", $dbi);
         list($points) = sql_fetch_array($result, $dbi);
         $userpoints = $userpoints + ($points * $points_fposts);
         }
      if ($points_kalender) {# Kalenderbeitraege
         $result = sql_query("select count(eid) from ".$prefix."_events where informant='$uname'", $dbi);
         list($points) = sql_fetch_array($result, $dbi);
         $userpoints = $userpoints + ($points * $points_kalender);
         }
               if ($points_private_Nachrichten) {# Private Nachrichten
         $result = sql_query("select count(eid) from ".$prefix."_priv_msgs where informant='$uname'", $dbi);
         list($points) = sql_fetch_array($result, $dbi);
         $userpoints = $userpoints + ($points * $points_kalender);
         }
   
      $result= sql_query("select count(uid) from ".$prefix."_userpoints where uid='$uid'", $dbi);
      list($checkit) = sql_fetch_array($result, $dbi);
     if($checkit<1) {
         sql_query("insert into ".$prefix."_userpoints (uid, punkte) VALUES($uid, $userpoints) ", $dbi);
         }
     else {
         sql_query("update ".$prefix."_userpoints set punkte = '$userpoints' where uid = '$uid' ", $dbi);
         }
      echo "<br>";
      OpenTable();
      echo "<center>";
      #$result= sql_query("select punkte from ".$prefix."_userpoints where uid='$uid'", $dbi);
      #list($userpoints) = sql_fetch_array($result, $dbi);
     if($userpoints==0) echo"<b>$uname "._NOPOINTS."</b>";
     if($userpoints==1) echo"<b>$uname "._YESPOINTS."</b>";
     if($userpoints>1) echo"<b>$uname "._HASPOINTS.": $userpoints</b>";
     echo "<br><br><a href=\"modules.php?op=modload&name=FAQ&file=index&myfaq=yes&id_cat=5&categories=UserPunkte\">"._USERPUNKTE."</a><b>$punkte</b><br>\n";
     echo "</center>";
     CloseTable();
      }
   }
?>
#########auszug aus der userpoints.php ende#######
Vielleicht kann mir ja jemand helfen!!

LG: Sascha

Sascha1981


Sascha1981

Hat denn niemand eine Lösung für mein Problem

EdeWuff

Scheinbar wird das Feld "gid" nicht gefunden. Schau mal deine Datenbank nach

Gruß, Peter

DarkBoy

hi
 manchmal geht es leider nicht so schnell :)  also  gedulde  dich bitte aber  ich schaue mir das einmal an :)  dauert nur bisschen :)