CREATE TABLE `cat_categories` ( `cat_id` int(10) unsigned NOT NULL auto_increment, `cat_parent` int(10) unsigned NOT NULL default '0', `cat_name` char(56) NOT NULL default 'Category', PRIMARY KEY(`cat_id`) ) ENGINE=MyISAM; INSERT INTO `cat_categories` (`cat_id`, `cat_parent`, `cat_name`) VALUES (1, 0, 'Test Category 1'), (2, 0, 'Test Category 2'), (3, 1, 'Test Category 3'), (4, 3, 'Test Category 4'),
There is a query that creates a table with categories, how in PHP to check the existence of a branch, if we know that
Test Category 1 -> Test Category 3 -> Test Category 4
Is it possible not to go through each value, but to form a SQL
query that will form this value?