gm tools dont show all the items online menu

User Tag List

Results 1 to 4 of 4
  1. #1
    darkmagishin's Avatar Active Member
    Reputation
    16
    Join Date
    May 2008
    Posts
    190
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    gm tools dont show all the items online

    hello ppls


    the problem



    notice it only shows 5 items on the picture above..





    the databse shows 6 items






    the code


    Code:
    <?php
    	error_reporting (error_reporting (0) & ~ E_NOTICE);
    	require_once('auth.php');
    	include_once("config.php");
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>GM Tools | Players</title>
    <link href="style.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <div id="navbar">
    <ul>
    <li><a href="ban.php"><span>Ban/Mute</span></a></li>
    <li><a href="tickets.php"><span>Tickets</span></a></li>
    <li><a href="mail.php"><span>Mail</span></a></li>
    
    <li><a href="online.php"><span>Online Players</span></a></li>
    <li><a class="right" href="items.php"><span>Item Lookup</span></a></li>
    <li><a class="right" href="creatures.php"><span>Creature Lookup</span></a></li>
    </ul>
    </div>
    <h1>Welcome to the search what items a character owns!<br><a href="gm-index.php">Return to Index</a></h1>
    <br><br><br><br><br><br><br>
    
    
    
    
    
    
    
    
    <form id="charsubmit" name="charsubmit" method="post" action="playeritems.php">
      <table width="300" border="0" align="center" cellpadding="2" cellspacing="0">
        <tr>
          <td width="112"><b>Character Name</b></td>
          <td width="188"><input name="charC" type="text" class="textfield" id="charC" /></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td><input type="submit" name="Submit" value="Submit" /></td>
        </tr>
      </table>
    </form>
    
    
    
    
    
    
    
    		<?PHP
    		
    		$charC = $_POST['charC'];
    		
    		mysql_connect(MYSQL_HOST,MYSQL_USER,MYSQL_PASS);
    		mysql_select_db(MYSQL_LOGON);
    		$result=mysql_query("SELECT * FROM characters WHERE name like '%$charC%'");
    		$rows = mysql_num_rows($result);
    		while ($players = mysql_fetch_assoc($result)) {
    		$gold = round(($players['gold'])/1000);
    		
    		
    		
    		$acct = $players['guid'];
    		
    		
    		
    		
    		}
    		
    
    			
    
    		
    
    			?>
    
     			<br>
    			You searched the character named: <h1><?php echo $charC; ?></h1>
    
    			<br><br><br><br>
    			<table border="1" width="150" align="center" cellpadding="2" cellspacing="0">
        			<tr>
      			
    			<th><b>Item IDs "<?php echo $charC; ?>" owns</b>
      			
    				
       			 </tr>
    
    
    
    			<?PHP
    
    			$charC = $_POST['charC'];
    			mysql_connect(MYSQL_HOST,MYSQL_USER,MYSQL_PASS);
    			mysql_select_db(MYSQL_LOGON);
    			$result2 = mysql_query("SELECT * FROM playeritems WHERE ownerguid = $acct");
    			$row2 = mysql_fetch_array($result2);
    			//$rez = $row2['entry'];
    			while ($players2 = mysql_fetch_assoc($result2)) 
    			{
    			
    			echo '<td>'.$players2['entry'].' </td>';
    		
    	
    			echo '</tr>';
    			}
    			?>
    
     			
    			 </table>
    
    
    
    
    
    
    
     
    </body>
    </html>




    does anyone know where im messing up? thanks for reading :]

    gm tools dont show all the items online
  2. #2
    darkmagishin's Avatar Active Member
    Reputation
    16
    Join Date
    May 2008
    Posts
    190
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    bumpbumpbump

  3. #3
    Kiev's Avatar Contributor
    Reputation
    288
    Join Date
    Nov 2007
    Posts
    1,819
    Thanks G/R
    0/4
    Trade Feedback
    3 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok i am no pro with Php but i have looked over your code and all seems fine... i have no idea why it is not working. Sorry

  4. #4
    TheSpidey's Avatar Elite User
    Reputation
    365
    Join Date
    Jan 2008
    Posts
    2,200
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    			$row2 = mysql_fetch_array($result2);
    			//$rez = $row2['entry'];
    			while ($players2 = mysql_fetch_assoc($result2))
    Notice how in this exerpt you're fetching from $result2 twice while only using the second fetch, meaning the first one will never be used and you'll always one less item than the player actually has.

Similar Threads

  1. [Selling] WTS all the items in the Pics
    By buuya in forum Trove Buy Sell Trade
    Replies: 0
    Last Post: 10-24-2015, 06:56 AM
  2. not showing all the menus in npc
    By edded in forum WoW EMU Questions & Requests
    Replies: 0
    Last Post: 07-31-2009, 11:20 PM
  3. Replies: 13
    Last Post: 04-12-2008, 10:48 AM
  4. Allmost All The Zul'Aman Item's!!
    By Summer in forum WoW EMU Guides & Tutorials
    Replies: 14
    Last Post: 12-24-2007, 03:30 PM
All times are GMT -5. The time now is 12:21 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search