Jump to content
MakeWebGames

corpseslayer

Members
  • Posts

    3
  • Joined

  • Last visited

    Never

corpseslayer's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Is it just me or does the business owner not get any stats for being the owner (ie in TC you get +50 per stat)
  2. Re: [mccode v2] Yet Another Attack A very good mod... but if the attacking user has no armour the match completly stalemates... even if its a lvl 1 attacking a level 100... Ive modded mine slightly to add melee weapons and intend to share it but am tryign to work out the armour bug first.
  3. I have a database that has a list of items in it that when combined make another item. (or thats the theory) but im having issues getting it to display the information. The loop runs once, then bails and does not run the rest of the code (to complete the table). The items required part shows with the item names, but the item given and make link do not show. If i take the loop out the table processes fine.   <?php include_once('globals.php'); echo '<h2>Workshop</h2>'; echo '<table border="0" width="95%" cellspacing="1" cellpadding="0" class="table"> <tr style="background: gray; "> <th>Recipe ID</th> <th>Items Required</th> <th>Item Given</th> <th>Make</th> </tr> <tr>'; $fetch = mysql_query("SELECT * FROM workshop") or die(mysql_error()); while($recipe = mysql_fetch_assoc($fetch)) { $sele = mysql_fetch_assoc($db->query("SELECT inv_id FROM inventory WHERE inv_userid = '{$ir['userid']}'")) or die(mysql_error()); $itemr = mysql_fetch_assoc($db->query("SELECT itmid, itmname FROM items WHERE itmid = '{$recipe['reciperecieved']}'")) or die(mysql_error()); // } echo "<td> {$recipe['recipeid']} </td>"; echo "<td> "; $items=explode(",","{$recipe['reciperequired']}"); $ingredients=count($items); for ($i = 0; $i <= $ingredients; $i++) { $itemname = mysql_fetch_assoc($db->query("SELECT itmid, itmname FROM items WHERE itmid = '{$items[$i]}'")) or die(mysql_error()); echo "{$itemname['itmname']} "; } echo "</td>"; echo "<td> {$itemr['itmname']} </td>"; echo "<td>Make</td></tr>"; } echo "</table>"; $h->endpage(); ?>   Above is my code, im new to both PHP and mySQL (I learned in old skool pascal!) so sorry if it looks bad!. I intend ot make the full mode free on here once its finished. Ill give + to anyone that can help! Thanks in advance.
×
×
  • Create New...