Get the `category_title` using javascript or from the category table using
the same MySql query?
In the items table I only save the category_id.
Is it better to get the category_title using javascript or from the
category table using the same MySql query?
All the categories are downloaded as a json file to the client when the
page is loaded. So the client has them all. (9KB)
Categories are around 700 items.
...
{id:1, title:"fruits"}
...
Using JS I would loop through categories until category.id ==
item.category_id and then return category.title.
No comments:
Post a Comment