This commit is contained in:
heama 2023-10-10 15:53:06 +05:30
parent 8cd03cd0d4
commit d80a8d9c04
2 changed files with 5 additions and 5 deletions

View File

@ -102,11 +102,11 @@ public function getSubscriberDataByCustomerId($customerId)
{
// Assuming 'subscription' is the table name where subscriber data is stored.
$builder = $this->db->table('subscription');
$builder->join('schemes', 'schemes.scheme_id = subscription.scheme_id');
$builder->join('books', 'books.book_id = subscription.scheme_id');
// Define the columns you want to select from the subscription table.
$builder->select('sub_id, to_subscription, from_subscription,schemes.scheme_name');
$builder->select('subscription.*,books.title');
// Add a where condition to filter results based on customer ID.
$builder->where('customer_id', $customerId);

View File

@ -321,14 +321,14 @@
<thead>
<tr>
<th>Subscription Name</th>
<th>Duration</th>
<th>Amount</th>
<th>From Subscription</th>
<th>To Subscription</th>
</tr>
</thead>
<tbody>
<?php foreach ($subscriptionData as $subscription): ?>
<tr>
<td><?= $subscription->scheme_name ?></td>
<td><?= $subscription->title ?></td>
<td><?= $subscription->from_subscription ?></td>
<td><?= $subscription->to_subscription ?></td>
</tr>