customer
This commit is contained in:
parent
8cd03cd0d4
commit
d80a8d9c04
@ -102,11 +102,11 @@ public function getSubscriberDataByCustomerId($customerId)
|
|||||||
{
|
{
|
||||||
// Assuming 'subscription' is the table name where subscriber data is stored.
|
// Assuming 'subscription' is the table name where subscriber data is stored.
|
||||||
$builder = $this->db->table('subscription');
|
$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.
|
// 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.
|
// Add a where condition to filter results based on customer ID.
|
||||||
$builder->where('customer_id', $customerId);
|
$builder->where('customer_id', $customerId);
|
||||||
|
|||||||
@ -321,14 +321,14 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Subscription Name</th>
|
<th>Subscription Name</th>
|
||||||
<th>Duration</th>
|
<th>From Subscription</th>
|
||||||
<th>Amount</th>
|
<th>To Subscription</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php foreach ($subscriptionData as $subscription): ?>
|
<?php foreach ($subscriptionData as $subscription): ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= $subscription->scheme_name ?></td>
|
<td><?= $subscription->title ?></td>
|
||||||
<td><?= $subscription->from_subscription ?></td>
|
<td><?= $subscription->from_subscription ?></td>
|
||||||
<td><?= $subscription->to_subscription ?></td>
|
<td><?= $subscription->to_subscription ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user