Hi every body
I read this lesson how to make inherit in MySQL
http://dev.mysql.com/tech-resources/...ical-data.html
I make my own table
CREATE TABLE IF NOT EXISTS `jos_vm_category_xref` (
`category_parent_id` int(11) NOT NULL default '0',
`category_child_id` int(11) NOT NULL default '0',
`category_list` int(11) default NULL,
PRIMARY KEY (`category_child_id`),
KEY `category_xref_category_parent_id` (`category_parent_id`),
KEY `idx_category_xref_category_list` (`category_list`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Category child-parent relation list';
and I run this query
SELECT t1.category_child_id AS lev1, t2.category_child_id AS lev2, t3.category_child_id AS lev3, t4.category_child_id AS lev4
FROM jos_vm_category_xref AS t1
LEFT JOIN jos_vm_category_xref AS t2 ON t2.category_child_id = t1.category_parent_id
LEFT JOIN jos_vm_category_xref AS t3 ON t3.category_child_id = t2.category_parent_id
LEFT JOIN jos_vm_category_xref AS t4 ON t4.category_child_id = t3.category_parent_id
WHERE category_parent_id =56
this error appear
#1052 - Column 'category_parent_id' in where clause is ambiguous
what is the problem , any body can help me ?
TANKS EVERY BODY I SOLVED THE PROBLE IT WAS IN WHERE category_parent_id =56 IT MUST BE T1.category_parent_id =56




Bookmarks