Title: breadcrum modified pre-order tree transversal mptt sql query
Description: this is a perfect example tutorial on how to use a Breadcrum Modified Pre-order Tree Transversal MPTT SQL Query PHP
Tags: this, is, a, perfect, example, tutorial, on, how, to, use, a, breadcrum, modified, pre, order, tree, transversal, mptt, sql, query
Info: This Post Has Been Viewed 1260 Times SinceSat Mar 15, 2008 3:11 pm Author hostman With 1 Replies #5865

breadcrum modified pre-order tree transversal mptt sql query

$sql = "SELECT C.* from myp1_category AS B, myp1_category AS C WHERE (B.category_left BETWEEN C.category_left AND C.category_right) AND (B.category_id = '12') ORDER BY C.category_left";

i created this query because i wanted to know how i can get the breadcrum out of a Modified Pre-order Tree Transversal menu as shown here:

http://www.wallpaperama.com/forums/mptt-modified-pre-order-tree-transversal-php-tree-menu-script-t5713.html

so in keeping with this example. i want to show all the links for the bread yellow so it would look like this:

Food
	Fruit
		Yellow


as you can see, Yellow has a value of 5 in id colum so i can use this query to get all its perents:

$sql = "SELECT C.* from myp1_category AS B, myp1_category AS C WHERE (B.category_left BETWEEN C.category_left AND C.category_right) AND (B.id = '5') ORDER BY C.category_left";
Comments (1)
View Top Comments
Leave Your Comments...
#1
esiaz:
1 year ago
#142425
esiaz Fri Aug 20, 2010 7:33 am
Hi hostman, have you had the solution on edit and delete for wallpaperama.c ? can you kindly post it? i require them for my project. Hope you can help. Thanks
Share
| More