I am having two tables.College_Infra_items and College_infrastructure.The College_Infra_items has following structure
col_infraId requiredSeat available collegeInfrastructureId
1 100 150 1
2 200 180 2
College_infrastructure has following structure
collegeInfrastructureId type name
1 UGC Land Requirement(In acres)
2 UGC Class rooms
3 AICTE Total Area
4 AICTE Loans
Now in my html on loading i am repeating College_infrastructure details . I am writing condition for types.That is if it is of UGC type then 1st two row details of College_infrastructure will load.If AICTE next two. Here is my html
In table format i am displaying details.In tbody section i am repeating College_infrastructure table for only "name" column.But i am unable to get details of requiredSeat and available because in query i am not performing join operation with College_infraItem table.
<tbody>
<tr role="row" class="even" data-ng-repeat="infraitem in
allInfraitemsByType">
<td><strong>{{infraitem.name}}</strong></td>
<td><input type="text"
name="requiredseat" data-ng-model="infraitem.requiredseat"></td>
<td>
<input type="text" name="available" data-ng-
model="infraitem.available"></td>
<td class="text-center"><button type="submit" class="btn GreenBtn"
data-ng-click="saveInfrastructureDetails(infraitem)"><span
class="glyphicon glyphicon-ok"></span>Save</button></td>
</tr>
</tbody>
In Query I am writing like this
SELECT collegeInfrastructureId as collegeInfrastructureId,type as
type,name as name FROM college_infrastructure where type=:type
order by collegeInfrastructureId asc";
This query only gives me College_Infrastructure table.But i want details of College_Infra_items also in same query. Can anyone tell how can i join College_Infra_items with this query so that in html repeat i can refer to College_Infra_items columns also.