user_id and contains home_id references // We need to join with {table_prefix}home to get server details $query = "SELECT h.home_id, h.home_name, h.enabled, rs.remote_server_name, gc.game_name, o.order_id, o.status, o.invoice_duration, -- use end_date as the expiration marker (set when order is paid/created) o.end_date AS expiration_date, bs.service_name, bs.price_monthly, o.price, o.discount_amount, o.coupon_id, bc.code AS coupon_code, bc.discount_percent AS coupon_discount_percent FROM {$table_prefix}home h LEFT JOIN {$table_prefix}remote_servers rs ON h.remote_server_id = rs.remote_server_id LEFT JOIN {$table_prefix}game_configs gc ON h.home_cfg_id = gc.home_cfg_id LEFT JOIN {$table_prefix}billing_orders o ON h.user_id = o.user_id LEFT JOIN {$table_prefix}billing_services bs ON o.service_id = bs.service_id LEFT JOIN {$table_prefix}billing_coupons bc ON o.coupon_id = bc.coupon_id WHERE h.user_id = $user_id ORDER BY h.home_id DESC"; $result = mysqli_query($db, $query); ?>
My Game Servers
0): ?>
Server Name Game Location Status Expiration Date Monthly Price Actions
0 && $server['coupon_code']) { echo '$' . number_format($price + $discount, 2) . '
'; echo '$' . number_format($price, 2) . ''; echo '
(' . htmlspecialchars($server['coupon_code']) . ' -' . number_format($server['coupon_discount_percent'], 0) . '%)'; } else { echo '$' . number_format($price, 2); } } else { echo 'N/A'; } ?>
Renew N/A

You don't have any game servers yet.

Browse Game Servers