From routes.php
Route::post('/invoices/detail/', function()
{
$db = new \PDO("odbc:DRIVER={AS400 Driver}; SYSTEM=mysystem.test.com;", "myid",
"mypasswd");
$query = "SELECT ILINVN, ILLINE, ILDATE, ILPROD, IDESC, ILQTY, (ILNET * ILQTY) AS
AMOUNT FROM mydb LEFT OUTER JOIN mydb ON ILPROD = IPROD WHERE ILINVN =
:invoice_number";
//query system
$statement = $db->prepare($query);
$statement->bindValue(':invoice_number', Session::get('invoice_number'),
PDO::PARAM_STR);
if($statement->execute() !== false)
{
//save system query results
$results = $statement->fetchAll(PDO::FETCH_ASSOC);
}
else
{
$results = array();
}
return View::make('invoice_detail')->with('results', $results);
})->before('auth');
This is from invoice_detail.blade.php I verified the query works. It appears the information is not making it to the view or something in the view is incorrect.
@extends('layouts.master')
@section('content')
@if(isset($results))
<div class="col-md-12">
<div class="pull-left">
<div>
</div>
</div>
<div class="pull-right">
</div>
</div>
<div class="col-md-12">
<h4>Tracking</h4>
<div class="table-responsive">
<table class="table table-bordered table-condensed table-hover table-striped">
<tr>
<td><p><strong>Invoice Number</strong></p></td>
<td><p><strong>Line #</strong></p></td>
<td><p><strong>Invoice Date</strong></p></td>
<td><p><strong>Item</strong></p></td>
<td><p><strong>Description</strong></p></td>
<td><p><strong>Qty Shipped</strong></p></td>
<td><p><strong>Ext. Amt.</strong></p></td>
</tr>
@foreach($results as $result)
<tr>
<td><p>{{ $result['ILINVN'] }}</p></td>
<td><p>{{ $result['ILLINE'] }}</p></td>
<td><p>{{ $result['ILDATE'] }}</p></td>
<td><p>{{ $result['ILPROD'] }}</p></td>
<td><p>{{ $result['IDESC'] }}</p></td>
<td><p>{{ $result['ILQTY'] }}</p></td>
<td><p>{{ $result['AMOUNT'] }}</p></td>
</tr>
@endforeach
</table>
</div>
</div>
@endif
@stop
Hope this helps. Too me a bit to get rid of this screaming about having so much code. lol Can't win. Sorry the lack of information initially. I thought it might be enough plus I was tired. Thanks again