[eluser]slowgary[/eluser]
I'm confused
Just to make sure I understand... based on your query, it looks like you're selecting all orders. This would lead me to believe that you're attempting to show many orders in your view. Also, there is one product and one sheet (whatever that is
per order.
The query looks fine, however it appears that you're only creating one order() object in your controller to pass to your view. I prefer to work with array, since I grew up in functional land, but if you plan to pass a collection of order objects to your view, I would expect to see something like this in your controller:
Code:
$this->load->model('order_model');
$orders = $this->order_model->get_all_orders();
foreach($orders as $order)
{
$temp = new Order();
$temp->set_properties($order);
$data['orders'][] = $temp;
}
$this->load->view('orders', $data);
Then in your view:
Code:
<?php foreach($orders as $order): ?>
<tr>
<td><?php echo $order->id; ?></td>
<td><?php echo $order->product_name; ?></td>
<td><?php echo $order->something_else; ?></td>
</tr>
<?php endforeach; ?>
Does that make sense for what you're trying to do?