>>  Site Map >>  Forums >>  Modules 6x

Forum module - topics in forum:



Modules 6x - Discussions regarding PHP-Nuke Modules.



MySQL Error: 0:

Hi guys, I'm having problems with my (Team) module.

here is the link to it in action and u can see that in the 2nd team there is a my sql error. And it isn't a problem with the sql database i don't think as i've tried changing the id's and everything and still no resolve.

http://www.4sightracing.com/hassclan/modules.php?name=Team

I've had a look through the index.php file of the module and i can't see anything wrong. Can anyone else see the error?

Or maybe is it an external error? like maybe too much info being requested at once or soemthing. I dunno :/


Here is the index.php file:

Code: :

<?php
/************************************************************************/
/* PHP-NUKE: Web Portal System                                          */
/* ===========================                                          */
/*                                                                      */
/* Copyright (c) 2002 by Francisco Burzi                                */
/* http://phpnuke.org                                                   */
/*                                                                      */
/* Module Gestion des Teams & Membres                               */
/* Module by Kommius                                                    */
/* Pour http://www.nuke-cs.net                                          */
/* Copyright (c) 2004 by Kommius                                        */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/
/* NUKE-CLAN 1.0.5 : PHP-NUKE FOR CLANS                                 */
/* ====================================                                 */
/* Copyright (c) 2003-2004 by Team Nuke-Clan                            */
/* http://www.nukeclan.net                                              */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/

if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
    die ("You can't access this file directly...");
}

require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);

/************************************************* fiche du membre ************************************/
function details ($uid, $team_id) {
global $prefix, $db, $module_name, $bgcolor1, $bgcolor2;
include("header.php");


$sql = "SELECT * FROM ".$prefix."_nsngr_team_users WHERE team_id=$uid";
$req = mysql_query($sql) or die('Erreur SQL !<br>'.$sql.'<br>'.mysql_error());
while($data = mysql_fetch_array($req))
{
$username=$data['mname'];
$prenom=$data['prenom'];
$age=$data['age'];
$ville=$data['ville'];
$photo=$data['photo'];
$motherboard=$data['motherboard'];
$cpu=$data['cpu'];
$ram=$data['ram'];
$video=$data['video'];
$resolution=$data['resolution'];
$sons=$data['sons'];
$ecran=$data['ecran'];
$souris=$data['souris'];
$clavier=$data['clavier'];
$connexion=$data['connexion'];
$osystem=$data['osystem'];
$pref1=$data['pref1'];
$pref2=$data['pref2'];
$pref3=$data['pref3'];
$pref4=$data['pref4'];
}

Opentable();
 
echo "<CENTER><OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0\"  WIDTH=100% height=52>"
."<PARAM NAME=movie VALUE=\"modules/$module_name/images/title.swf?text=$username\">"
."<PARAM NAME=quality VALUE=high>"
."<PARAM NAME=bgcolor VALUE=$bgcolor2>"
."<PARAM NAME=menu VALUE=false>"
."<EMBED src=\"modules/$module_name/images/title.swf?text=$username\" bgcolor=$bgcolor2 quality=high WIDTH=100% height=52 TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" menu=\"false\"></EMBED>"
."</OBJECT><br>";

Opentable();   
if ($prenom!= ""){
echo"   <center><table width=\"100%\" border=\"0\" cellpadding=\"1\" cellspacing=\"0\">
   <tr><td height=\"20\" colspan=\"2\" bgcolor=$bgcolor1 align=\"center\" bgcolor=\"$bgcolor1\">
   <b><i><big>"._INFOPERSO."</big></i></b></td>
     </tr><tr><td width=\"100%\"><table cellpadding=\"1\" cellspacing=\"0\"><tr>
        <td><b>&nbsp;&nbsp;» "._NICK." :</b><td>$username</td>
   </tr><tr><td><b>&nbsp;&nbsp;» "._LASTNAME." :</b><td>$prenom</td></tr><tr>
   <td><b>&nbsp;&nbsp;» "._AGE." :</b><td>$age</td>
   </tr><tr><td><b>&nbsp;&nbsp;» "._CITY." :</b><td>$ville</td></tr><tr>
   <td><b>&nbsp;&nbsp;» "._MAIL." :</b><td><a href=\"mailto:$email\">$email</a></td>
   </tr><tr><td><b>&nbsp;&nbsp;» "._URL." :</b><td>";

   if ($url!= ""){echo"<a href=\"$url\">$url</a>";}else{echo"N/A";}

echo"   </td></tr><td><b>&nbsp;&nbsp;» "._ICQ." :</b><td>";

   if ($icq!= ""){echo"<a href=\"http://wwp.icq.com/scripts/Search.dll?to=$icq\">$icq</a>";}else{echo"N/A";}

echo"   </td></tr><tr><td><b>&nbsp;&nbsp;» "._MSN." :</b><td>";

   if ($msnm!= ""){
echo"   <a href=\"mailto:$msnm\">$msnm</a>";
   }else{echo"N/A";}

echo"   </td></tr><tr><td><b>&nbsp;&nbsp;» "._AIM." :</b><td>";

   if ($aim!= ""){echo"<a href=\"aim:goim?screenname=$aim&message=Hi+$aim+Are+you+there+?\" target=\"_blank\">$aim</a>";}else{echo"N/A";}

echo"   </td></tr><tr><td><b>&nbsp;&nbsp;» "._YIM." :</b><td>";

   if ($yim!= ""){echo"<a href=\"http://edit.yahoo.com/config/send_webmesg?target=$yim&src=pg\">$yim</a>";}else{echo"N/A";}

echo"   </td></tr><tr></table></td><td align=\"right\">";

if ($photo!= ""){
echo"   <img src=\"$photo\" width=\"100\" height=\"100\">&nbsp;&nbsp;";
}else{echo"<img src=\"modules/$module_name/images/pas_image.jpg\" width=\"100\" height=\"100\">&nbsp;&nbsp;";}   

echo"     </td></tr><tr><td height=\"20\" colspan=\"2\" bgcolor=$bgcolor1 align=\"center\" bgcolor=\"$bgcolor1\">
   <b><i><big>"._HARDCONFIG."</big></i></b></td></tr><tr><td colspan=\"2\"><table><tr>
   <td><b>&nbsp;&nbsp;» "._PROCESSOR." : </b></td><td>$cpu</td></tr><tr>
        <td><b>&nbsp;&nbsp;» "._MEMORY." : </b></td><td>$ram</td></tr><tr>
   <td><b>&nbsp;&nbsp;» "._MOTHERBOARD." : </b></td><td>$motherboard</td></tr><tr>
   <td><b>&nbsp;&nbsp;» "._VIDEOCARD." : </b></td><td>$video</td></tr><tr>
   <td><b>&nbsp;&nbsp;» "._RESOLUTION." : </b></td><td>$resolution</td></tr><tr>
        <td><b>&nbsp;&nbsp;» "._SOUNDCARD." : </b></td><td>$sons</td></tr><tr>
        <td><b>&nbsp;&nbsp;» "._MOUSE." : </b></td><td>$souris</td></tr><tr>
        <td><b>&nbsp;&nbsp;» "._KEYBOARD." : </b></td><td>$clavier</td></tr><tr>
        <td><b>&nbsp;&nbsp;» "._MONITOR." : </b></td><td>$ecran</td></tr><tr>
        <td><b>&nbsp;&nbsp;» "._SYSTEMOS." : </b></td><td>$osystem</td></tr><tr>
   <td><b>&nbsp;&nbsp;» "._CONNECT." :</b></td><td>$connexion</td></tr>
   </table></td></tr><tr> <td height=\"20\" colspan=\"2\"align=\"center\" bgcolor=\"$bgcolor1\">
   <b><i><big>"._PREF."</big><i></b></td></tr><tr><td colspan=\"2\"><table><tr>
   <td><b>&nbsp;&nbsp;» "._FAVWEAPON1." :</b></td><td>$pref1</td></tr><tr>
   <td><b>&nbsp;&nbsp;» "._FAVWEAPON2." :</b></td><td>$pref2</td></tr><tr>
   <td><b>&nbsp;&nbsp;» "._FAVMAP1." :</b></td><td>$pref3</td></tr><tr>
   <td><b>&nbsp;&nbsp;» "._FAVMAP2." :</b></td><td>$pref5</td></tr></table></td></tr></table><br>";
   echo"<center><br>[ <a href=modules.php?name=$module_name>"._BACK2."</a> ]</center>";
CloseTable();   

}else{
echo"<center><table width=\"90%\" border=\"0\" cellpadding=\"1\" cellspacing=\"0\">
   <tr><td align=\"center\" width=\"10%\"><em>"._NOPREF."</em></td></tr>
   <tr><td align=\"center\" width=\"10%\"><a href=modules.php?name=Private_Messages&file=index&mode=post>"._YES."</a> | <a href=modules.php?name=$module_name>"._NO."</a></table>";
echo"<center><br>[ <a href=modules.php?name=$module_name>"._BACK2."</a> ]</center>";
CloseTable();
}
CloseTable();
include("footer.php");

}


/*********************************** Menu de Naviguation par défaut ******************************************************/
function main_gestion()
{
global $prefix, $db, $module_name, $bgcolor2, $bgcolor3;
   include("header.php");
   $sqlA = "SELECT * FROM ".$prefix."_config";
   $reqA = mysql_query($sqlA) or die('Erreur SQL !<br>'.$sqlA.'<br>'.mysql_error());
   while(list($sitename) = mysql_fetch_array($reqA)){
   $nom_site = "$sitename";
   }
OpenTable();
   echo "<CENTER><OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0\"  WIDTH=100% height=52>"
   ."<PARAM NAME=movie VALUE=\"modules/$module_name/images/title.swf?text=$nom_site: "._MODULENAME."\">"
   ."<PARAM NAME=quality VALUE=high>"
   ."<PARAM NAME=bgcolor VALUE=$bgcolor2>"
   ."<PARAM NAME=menu VALUE=false>"
   ."<EMBED src=\"modules/$module_name/images/title.swf?text=$nom_site: "._MODULENAME."\" bgcolor=$bgcolor2 quality=high WIDTH=100% height=52 TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" menu=\"false\"></EMBED>"
   ."</OBJECT><br>";
   
$result = $db->sql_query("SELECT gid, tname FROM ".$prefix."_nsngr_acces WHERE gid>0 ORDER BY gid");
if ($db->sql_numrows($result) == 0) {
OpenTable();
echo "<b><i>"._NOTEAM2."</i></b>";
CloseTable();
}
if ($db->sql_numrows($result) > 0) {
        while ($row = $db->sql_fetchrow($result)) {
   $gid = $row['gid'];
   $tname = $row['tname'];
   
OpenTable();
echo "<center><b><i>$tname</i></b></center>";
echo"<hr><TABLE width=\"100%\" cellpading=\"0\" cellspacing=\"1\"><tr>
   <td bgcolor=\"$bgcolor3\" width=\"30%\"><b>"._NICK."</b></td>
   <td bgcolor=\"$bgcolor3\" align=\"center\" width=\"10%\"><b>"._MAIL."</b></td>
   <td bgcolor=\"$bgcolor3\" align=\"center\" width=\"10%\"><b>"._ICQ."</b></td>
   <td bgcolor=\"$bgcolor3\" align=\"center\" width=\"10%\"><b>"._MSN."</b></td>
   <td bgcolor=\"$bgcolor3\" align=\"center\" width=\"10%\"><b>"._AIM."</b></td>
   <td bgcolor=\"$bgcolor3\" align=\"center\" width=\"10%\"><b>"._YIM."</b></td>
   <td bgcolor=\"$bgcolor3\" align=\"center\" width=\"20%\"><b>"._RANK."</b></td>
    </tr></table>";
   $result2 = $db->sql_query("SELECT * FROM ".$prefix."_nsngr_users WHERE gid='$gid' ORDER BY gid");
   $num = $db->sql_numrows($result2);
   if ($num != 0) {
       while ($row2 = $db->sql_fetchrow($result2)) {
            $uid=$row2['uid'];
            $username=$row2['uname'];
            $email=$row2['email'];
            $prenom=$row2['prenom'];
            $age=$row2['age'];
            $ville=$row2['ville'];
            $photo=$row2['photo'];
            $motherboard=$row2['motherboard'];
            $cpu=$row2['cpu'];
            $ram=$row2['ram'];
            $video=$row2['video'];
            $resolution=$row2['resolution'];
            $sons=$row2['sons'];
            $ecran=$row2['ecran'];
            $souris=$row2['souris'];
            $clavier=$row2['clavier'];
            $connexion=$row2['connexion'];
            $osystem=$row2['osystem'];
            $pref1=$row2['pref1'];
            $pref2=$row2['pref2'];
            $pref3=$row2['pref3'];
            $pref4=$row2['pref4'];
            $statut=$row2['statut'];
echo"<table width=\"100%\" cellspacing=\"0\" cellpadding=\"1\"><tr>
   <td width=\"30%\"><a href=modules.php?name=$module_name&op=details&uid=$uid>$username</a></td>";
      $row3 = $db->sql_fetchrow($db->sql_query("SELECT user_msnm, user_icq, user_aim, user_yim FROM ".$prefix."_users WHERE user_id='$uid'"))or die("MySQL Error: ".mysql_errno().": ".mysql_error());
            $msnm=$row3['user_msnm'];
            $icq=$row3['user_icq'];
            $aim=$row3['user_aim'];
            $yim=$row3['user_yim'];
            
   if ($email!= ""){echo"<td align=\"center\" width=\"10%\"><a href=\"mailto:$email\"><img src=\"modules/$module_name/images/mail.gif\" border=\"0\" alt=\"$email\"></a></td>";
    }else{echo"<td align=\"center\" width=\"10%\">N/A</td>";}
   
   if ($icq!= ""){echo"<td align=\"center\" width=\"10%\"><a href=\"http://wwp.icq.com/scripts/search.dll?to=$icq\">
   <img src=\"http://web.icq.com/whitepages/online?icq=120945090&img=5\" alt=\"$icq\" border=\"0\"></a></td>";
    }else{echo"<td align=\"center\" width=\"10%\">N/A</td>";}
   
   if ($msnm!= ""){echo"<td align=\"center\" width=\"10%\"><a href=\"mailto:$user_msnm\"><img src=\"modules/$module_name/images/msn.gif\" alt=\"$user_msnm\" border=\"0\"></a></td>";
   }else{echo"<td align=\"center\" width=\"10%\">N/A</td>";}   
   
   if ($aim!= ""){echo"<td align=\"center\" width=\"10%\"><a href=\"aim:goim?screenname=$aim&message=Hi+$aim+Are+you+there+?\" target=\"_blank\">
   <img src=\"modules/$module_name/images/aim.gif\" alt=\"$user_aim\" border=\"0\"></td>";
   }else{echo"<td align=\"center\" width=\"10%\">N/A</td>";}   
   
   if ($yim!= ""){echo"<td align=\"center\" width=\"10%\"><a href=\"http://edit.yahoo.com/config/send_webmesg?.target=$yim&.src=pg\">
   <img src=\"modules/$module_name/images/yim.gif\" alt=\"$user_yim\" border=\"0\"></a></td>";
   }else{echo"<td align=\"center\" width=\"10%\">N/A</td>";}   
   
   echo "<td width=\"25%\" align=center>$statut</td>";
   echo"<td align=\"center\" width=\"20%\"></td>";
       }
   } else {
       echo "<br><table width=\"100%\" cellspacing=\"0\" cellpadding=\"1\"><tr>
   <td align=\"center\"><b><i>"._NOMEMBERS."</i></b></td>";
   
   }
   echo "</tr></table>";
  CloseTable();
  } 
}
CloseTable();
include("footer.php");
}


switch ($op)
{

   case "main_gestion":
    main_gestion();
    break;

   case "details":
   details($uid, $team_id);
   break;
   
   default:
   main_gestion();
   break;
}

?>


Any help would be greatly appreciated,
Thx
Scott






Have absolutely no idea TBH. Confused

It also doesnt help that it comes from a french site.

Maybe you could post in their forum and hope for an answer in english.






hmm, ok thx anyway






hey, I searched on google and found this:

http://64.233.161.104/search?q=cache:o4Mw8LWn5-YJ:www.openwin.org/mike/faq/faq.php/error-cannot-create-windows-service-for-mysql-error-0/+%22MySQL+Error:+0:%22&hl=en


So the problem is on my hosts side? I've had so many problems with them recently




Attention! You are currently viewing sitemap page!
We strongly suggest to look at original content

Search from web

Valid HTML 4.01 Valid CSS