Blog Database Structure - Categories & Meta Tags |
[eluser]lenwood[/eluser]
[quote author="jedd" date="1272927279"]Can you describe in more detail the two different approaches?[/quote] If I understand dmorin's post, he's loading all data within the posts, comments & categories tables, he does some processing to determine which category names are associated with each post, then generates a follow up query with LEFT JOIN statements that loads all of this data into an array. As I was coding over the weekend, I already had code that associates comments with each post_id working in a foreach statement. My intent was to query the cat_id's associated with each post_id and finally query the category names. I'm not using any join statements, I'm trying to add the category names to an array that's already created. I wasn't able to get my code to work. This morning I came back and read through this again and realized that maybe I was looking at it the wrong way. As I'm typing this out I realize that perhaps the only difference is that I'm not using join statements. I may try that when I get home tonight. |
Welcome Guest, Not a member yet? Register Sign In |