Displaying 1 result from an estimated 1 matches for "total_list_item".
Did you mean:
total_list_items
2006 May 13
4
somewhat advanced question about mysql
...es: lists, items, comments, and this is how they are laid out:
lists table
id
title
items table
id
list_id
item
comments table
id
list_id
comment
to give you some background. in order to get a list of all the lists i am making this call:
SELECT lists.id, title, count(items.list_id) AS total_list_items
FROM lists
INNER JOIN items ON list_id = lists.id
GROUP BY list_id
ORDER BY created_on DESC
LIMIT 10
i need to make that kind of a call because when i print out the list of lists they look like this:
10 favorite movies
15 favorite cheese
8 places to eat sushi
etc e...