Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Feb 07, 2012 10:56 PM by pares101
Member
37 Points
37 Posts
Feb 07, 2012 10:29 PM|LINK
Ok here is the situation.... I have a table called Products inside it i have
ProductId is key
Title
Description
Price
Keywords
Category is int
then I have another table called Categories and inside this table I have
CategoryId is Primary & Identity & Int
CategoryTitle
Now inside the data I have
CategoryId = 1
CategoryTitle = Clothes
CategoryId = 2
CategoryTitle = Songs
In the Products Table Data
I have a product with Category = 1
How do I link the two table datas to show a product from category 1 ???
Contributor
5418 Points
730 Posts
Feb 07, 2012 10:38 PM|LINK
The SELECT statement is the following:
SELECT ProductId, Title, Description, Price, Keywords, CategoryTitle FROM Products JOIN Categories ON Products.Category = Categories.CategoryId
Feb 07, 2012 10:56 PM|LINK
Thank you !
pares101
Member
37 Points
37 Posts
Question with calling database columns !!
Feb 07, 2012 10:29 PM|LINK
Ok here is the situation.... I have a table called Products inside it i have
ProductId is key
Title
Description
Price
Keywords
Category is int
then I have another table called Categories and inside this table I have
CategoryId is Primary & Identity & Int
CategoryTitle
Now inside the data I have
CategoryId = 1
CategoryTitle = Clothes
CategoryId = 2
CategoryTitle = Songs
In the Products Table Data
I have a product with Category = 1
How do I link the two table datas to show a product from category 1 ???
GmGregori
Contributor
5418 Points
730 Posts
Re: Question with calling database columns !!
Feb 07, 2012 10:38 PM|LINK
The SELECT statement is the following:
pares101
Member
37 Points
37 Posts
Re: Question with calling database columns !!
Feb 07, 2012 10:56 PM|LINK
Thank you !