I'm Using php and Mysql database. which one is the faster way for select data from database
- Input category id/*name* to each row of product table, then
select * from product table WHERE category name = something
or
- Make a relationships table, search in this table first, then select matched result from product table
and what about ID or NAME? Is it necessary to search for IDs, then convert them to NAMEs which way is better?
- Using php to convert category id to category name
- Using category-name table to convert id to category name
- Get category name from the prosuct's row in product table