How would I be able to display a url value from a sub category listed in my MySQL database that looks something like the example below?
index.php?cat=category&sub=sub-cat-1&sub2=sub-cat-2&sub3=sub-cat-3
Here is the MySQL table.
CREATE TABLE categories (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
parentID INT UNSIGNED NOT NULL DEFAULT 0,
categoryNAME TEXT NOT NULL,
PRIMARY KEY (id),
INDEX parent (parentID)
);
UPDATE: My end goal is to create a link to a sub category from a page that is associated with a parent category.
Example: I am on the "Auto Parts" page and I would like to display a link to the "Engine Parts", "Suspension Parts" and "Transmission Parts" pages.