I have a list page showing jobs to be done, in each job there is multiple products that are recorded in a 2nd table which needs to be displayed all at once
This image is a mock up to show what i am trying to achieve
I dont want the items from table B displayed in a seperate table (Master - > Child) which needs to be mouse clicked to open and display the info
I want the items from table B to be inline with the job info from table A
I have created a field in Table A called dummy_field
dummy_field is set to view as custom
php code below i have tried... different variations still with only 1 [row] of results not multiple as I want and have shown in the mock up on job_id 141
`
$job_id = $data["job_id"];
$sqlcount = "select count(*) from items_required where job_id=$job_id";
$number = DB::Query($sqlcount);
$sql = "select * from items_required where job_id=$job_id ";
$rs = DB::Query($sql);
$i = 0;
if ($number == 0){
}
elseif ($number > 0) {
while ($i < $number){
while ($row = db_fetch_array($rs))
{
$qty = $row['qty'];
$item = $row['item'];
}
print "$qty $item
";
$i++;
}
}
`This code does not work and only produces 1 item per job not the multiple items that are in Table B with the same job_id
Thanks in advance