function getBaseShips($player_id, $ship_id) { global $table; $baseships = 0; $sql_baseships = "SELECT `amount` FROM $table[playerunit] WHERE `player_id` = '$player_id' AND `unit_id` = '$ship_id'"; $rec_baseships = mysql_query($sql_baseships); $num_baseships = mysql_num_rows($rec_baseships); if ($num_baseships > 0) { while ($res_baseships = mysql_fetch_assoc($rec_baseships)) { $baseships += $res_baseships['amount']; } } $baseships -= getAllFleetships($player_id, $ship_id); return $baseships; }
?> <tr> <td><?php echo $rec_shipover['name']; ?> </td> <td><?php echo parseInteger($rec_shipover['amount']); ?> </td> <td><?php echo parseInteger($rec_shipover['amount'] - getAllFleetships($playerdata['id'], $rec_shipover['id'])); ?> </td> <td><?php echo parseInteger(getAllFleetships($playerdata['id'], $rec_shipover['id'])); ?> </td> </tr> <? } } } ?> </form> </table> </td> </tr> </table> </td> <td width="4" background="img/border/R.gif"> </td>