I’ve started to create a very simple blog and decided to put a decent effort into the database for once. I have a table for posts called tblPosts and table for the post categories called tblCategory and a table to hold the id’s for tblPosts and tblCategory so that a post can be associated with multiple categories called tblPostCategory. The trouble I’m having is i’m stuck with how to handle this in the asp… or Should I handle all the data with a stored procedure?
CREATE PROCEDURE apPostAndCategoryGet
@ID int
AS
SELECT * FROM tblPost WHERE PostID = @ID
SELECT * FROM tblPostCategory WHERE PostID = @ID
GO
I have that so far and was wondering what the best solution was to retrieve the data from tblCategory thats specific to the postID.?
Any suggestions would really help right now. I’m not used to retrieving data from more than one table at a time.
David