Back

How do I directly show Category Name instead of Category ID that is on another table?


Here is pictorial Question with 3 screenshots: http://imgur.com/a/94vrg

TKarahan replied 6 months ago

Could you show your "Products" database schema? When I look your code, I see "$product->productCategoryID". If you keep your category name in database, you can use "$product->productCategoryName".

PS: If your Category Name rows name is "productCategoryName", you can use this. But if your Category Name rows name is different than "productCategoryName" you can't use "productCategoryName". You have to use your rows name.

rijans replied 5 months ago

TKarahan said:

Could you show your "Products" database schema? When I look your code, I see "$product->productCategoryID". If you keep your category name in database, you can use "$product->productCategoryName".

PS: If your Category Name rows name is "productCategoryName", you can use this. But if your Category Name rows name is different than "productCategoryName" you can't use "productCategoryName". You have to use your rows name.

Man my Products and Categories are different table. I store Category ID in Products Table. Here's my database schema: http://imgur.com/a/4pK6a


Sign in to participate in this thread!



We'd like to thank these amazing companies for supporting us