Vote count:
0
I made two tables in my database;
Now,
The todo_list table contains
But has childs called list items, hence the 2nd table;
This table todo_list_item contains
- id
- list_id
- name
- status_id
What i'm trying to achieve, is:
- Listing all todo_lists
- Show how many todo_list_items they contain
- Get the last status_id from the todo_list_item table, per todo_list
Can i achieve this with one join, or do i really have to join the todo_list_item table twice, to get the count of items, and the last status_id seperately?
asked 16 secs ago
Select last value and totalcount from joined table
Aucun commentaire:
Enregistrer un commentaire