prepare('SELECT custcode, custname FROM customers ORDER BY custname ASC'); $stmt->execute(); $customers = $stmt->fetchAll(PDO::FETCH_ASSOC); } catch (PDOException $e) { echo "Error fetching customers: " . $e->getMessage(); $customers = []; } $selected_custcode = $_GET['custcode'] ?? null; $lifecycle_data = []; if ($selected_custcode) { try { $stmt = $pdoconn->prepare(' SELECT l.id, l.product_id, p.prodname, DATE(l.first_ship_month) as first_ship_month, DATE(l.last_ship_month) as last_ship_month, l.store_count, l.runrate FROM lifecycle l JOIN products p ON l.product_id = p.product_id WHERE l.custcode = :custcode ORDER BY l.first_ship_month DESC '); $stmt->execute(['custcode' => $selected_custcode]); $lifecycle_data = $stmt->fetchAll(PDO::FETCH_ASSOC); } catch (PDOException $e) { echo "Error fetching lifecycle data: " . $e->getMessage(); } } ?> Manage Lifecycle Data

Manage Lifecycle Data

Select a customer to view their product lifecycle information.

Lifecycle Records for

ID Product Name First Ship Month Last Ship Month Store Count Run Rate
No lifecycle records found for the selected customer.