Thread Verfasser: Final22
Thread ID: 1236
Thread Info
Es gibt 2 Beiträge zu diesem Thema, und es wurde 1556 Mal angesehen.
 Thema drucken
2x Mal = Insert Into
Final22
Ich habe das Problem das in dem nachfolgendem Code die Insert Into Funktion zwei mal in die Datenbank geschrieben wird aber ich weiß nicht warum. Vielleicht kann mir jemand von euch helfen?


Die stelle die doppelt eingetragen wird:


$jetzt=""; $jetzt=time(); $bcheck=md5(time());
   $buchen_sql="INSERT INTO ".DB_JSH_OLTRANSFLKTO." (`ktobid`, `ktodate`, `ktovonvid`, `ktoanvid`, `ktotxt`, `ktosumme`, `ktomd5`)
   VALUES (NULL , '$jetzt', '999999', '$clubb', 'Spieler geloescht', '$plmarktwert', '$bcheck');";
   $result_kto = dbquery($buchen_sql);
   $jetzt=""; $jetzt=time(); $bcheck=md5(time());



Gesamter Code:


$user_id=$userdata['user_id'];
   $user_name=$userdata['user_name'];


   opentable("Spieler bearbeiten");


   if($_GET['loeschen'] == 'kill'){


   $clubb=$_GET['club'];
   $plid=$_GET['pliddd'];
   $plmarktwert=$_GET['mw'];

   echo"Spieler wurde gelöscht. <br>";   


   $jetzt=""; $jetzt=time(); $bcheck=md5(time());
   $buchen_sql="INSERT INTO ".DB_JSH_OLTRANSFLKTO." (`ktobid`, `ktodate`, `ktovonvid`, `ktoanvid`, `ktotxt`, `ktosumme`, `ktomd5`)
   VALUES (NULL , '$jetzt', '999999', '$clubb', 'Spieler geloescht', '$plmarktwert', '$bcheck');";
   $result_kto = dbquery($buchen_sql);
   $jetzt=""; $jetzt=time(); $bcheck=md5(time());

   $del_spieler=dbquery("DELETE FROM ".$db_prefix."jsh_tfl_player WHERE `plid`='$plid' LIMIT 1");


   }



   if($_GET['bearbeiten'] == 'bearbeiten'){

   
   $clubb=$_GET['club'];
   $plid=$_GET['pliddd'];
   $plmarktwert=$_GET['mw'];
   

   echo"<br><a href='http://www.pfifac.de/infusions/jsh_oltfl/spieler_b.php' class='button'>Zurück</a><br><br><br><br><table width='100%' align='center' class='tbl4'>
   <tr class='tbl3' witdh='100%'>
   <td align='center' width='100px'></td>
   <td align='center'>Position</td>
   <td align='center'>Name</td>
   <td align='center'>Nation</td>
   <td align='center'>Stärke</td>
   <td colspan='2'></td></tr>";
   
   
   $order="posid,plposition,plstaerke";
   $z=0;
   $query = "SELECT * FROM fusiontC733_jsh_tfl_player, fusiontC733_jsh_tfl_position WHERE plvid=$clubb AND plposition=posbez ORDER BY $order";
   $result = mysql_query($query);
   while($line = dbarray($result)) {
   $plnamee=$line['plname'];
   $plpositionn=$line['plposition'];
   $plnationn=$line['plnation'];
   $plstaerkee=$line['plstaerke'];
   $plmarktwert=$line['plmarktwert'];
   $check=$line['plcheck'];
   $plid=$line['plid'];
   
   
   $z++;
   echo"<tr>
   <td align='center' class='tbl4'><b>$z.</b></td>
   <td align='center' class='tbl4'>";

if ($plpositionn=="TW") {
        echo "<font color='#ee610c' style='font-style: normal; font-weight: 200; font-size: 12px;'>$plpositionn</font>";
      };
if ($plpositionn=="IV" || $plpositionn=="RV" || $plpositionn=="LV") {
        echo "<font color='#debd03' style='font-style: normal; font-weight: 200; font-size: 12px;'>$plpositionn</font>";
      };
if ($plpositionn=="DM" || $plpositionn=="ZOM" || $plpositionn=="LM"|| $plpositionn=="RM"|| $plpositionn=="ZM") {
        echo "<font color='#298f00' style='font-style: normal; font-weight: 200; font-size: 12px;'>$plpositionn</font>";
      };
if ($plpositionn=="MS" || $plpositionn=="ST" || $plpositionn=="RA"|| $plpositionn=="LA"|| $plpositionn=="RF"|| $plpositionn=="LF") {
        echo "<font color='#2972fa' style='font-style: normal; font-weight: 200; font-size: 12px;'>$plpositionn</font>";
      };
   
   $str=$plnamee;
   
   echo"</td>
   <td align='center' class='tbl4'><a href='http://sofifa.com/players?keyword=",mb_convert_encoding($plnamee, "UTF-8", "windows-1252"),"' target='_blank'>$plnamee</a></td>
   <td align='center' class='tbl4'>$plnationn</td>
   <td align='center' class='tbl4'>$plstaerkee</td>
   <td align='center' class='tbl4' width='50px'><a href='http://pfifac.de/infusions/jsh_oltfl/spielerb.php?act=edit&plid_g=$plid&plcheck_g=$check' target='_blank'><img src='http://cdns2.freepik.com/fotos-kostenlos/schule-bleistift_318-38505.jpg' width='25px' height='25px' title='Spieler bearbeiten'></a></td>
   <td align='center' class='tbl4' width='50px'><a href='http://www.pfifac.de/infusions/jsh_oltfl/spieler_b.php?loeschen=kill&pliddd=$plid&mw=$plmarktwert&club=$clubb' target='_blank'><img src='http://pfifac.de/infusions/wir_sind_tippspiel/symbols/delete.png' title='Spieler löschen'></a></td></tr>";
   
   
   }
   echo"</table>";
   } else {

   echo"<br><br><br><br><table width='100%' align='center' class='tbl4'>
   <tr class='tbl3' witdh='100%'><td align='center'>ID</td><td align='center'>Bild</td><td align='center'>Verein</td><td align='center' width='100px' colspan='2'></td></tr>";
   
   

   $query = "SELECT * FROM fusiontC733_jsh_tfl_vereine order by vid";
   $result = mysql_query($query);
   while ($line = mysql_fetch_array($result)) {
   $vidd=$line['vid'];
   $bezz=$line['vbezeichnung'];

   $club_logo=INFUSIONS."jsh_oltfl/logo_images/$vidd.gif";
   
   if($vidd==55){
   
   }else{

   echo"<tr>
   <td align='center' class='tbl4'>$vidd</td>
   <td align='center' class='tbl4'><img src='$club_logo' width='30px' height='30px'></td>
   <td align='center' class='tbl4'><b>$bezz</b></td>   
   <td align='center' class='tbl4'><a href='http://www.pfifac.de/infusions/jsh_oltfl/spieler_b.php?bearbeiten=bearbeiten&club=$vidd'><img src='http://cdns2.freepik.com/fotos-kostenlos/schule-bleistift_318-38505.jpg' width='30px' height='30px' title='Team bearbeiten'></a></td>
   <td align='center' class='tbl4'><a href='http://www.pfifac.de/infusions/jsh_oltfl/spieler_b.php?verein=bearbeiten&club=$vidd'><img src='http://cdns2.freepik.com/fotos-kostenlos/gekrummten-pfeil-nach-unten_318-35580.jpg' width='30px' height='30px' title='Upload'></a></td>
   </tr>";

   }}
   echo"</table><br><br><br><br>";
   

closetable();}
Information:
PHP Version: Nicht ausgewählt •  MySQL Version: Nicht ausgewählt •  PHP-Fusion: Nicht ausgewählt
 
John Doe
Der Code ist uralt. Hättest mal ein Update holen sollen. Ach ja, ihr wolltet ja keine Unterstützung und auch keiner anderen Liga helfen.
Sind denn wenigstens die (C) und about.php vorhanden????
Habt ihr wenigstens die Logos im Code gelassen oder auch durch eigene ersetzt?

Such mal
;";

Achja, die Liga gibts in der Version 4.0. Inkl. Liga-Verwaltung.
Welche Version habt ihr?
Information:
PHP Version: Nicht ausgewählt •  MySQL Version: Nicht ausgewählt •  PHP-Fusion: Nicht ausgewählt
 
Springe ins Forum: