PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 16th, 2013, 03:42 AM
benwenger benwenger is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 353 benwenger User rank is Corporal (100 - 500 Reputation Level)benwenger User rank is Corporal (100 - 500 Reputation Level)benwenger User rank is Corporal (100 - 500 Reputation Level)benwenger User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 5 Days 2 h 31 m 18 sec
Reputation Power: 10
Check if tree branch has data

I have a menu tree in a mysql database which I can display easily by a recursive php function

INSERT INTO `car_nav` (`rowid`,`parent`,`name`) VALUES
(1,NULL,'cars'),
(2,1,'BMW'),
(3,1,'VW'),
(4,1,'Audi'),
(5,2,'4WD'),
(6,4,'coupe'),
(7,3,'coupe'),
(8,7,'4WD'),
(9,3,'limousine'),
etc...

INSERT INTO `car_data` (`navid`,`details`) VALUES
(5,'this car has...'),
(5,'a luxury model for...'),
(6,'another car for...'),
etc...

Is there a way in PHP to show only the branches who end in an entry from the car_data DB and leave out those who are blind?
In above example all branches that origin from VW would be hidden, as there are no models assigned.

Last edited by benwenger : February 16th, 2013 at 03:47 AM.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > Check if tree branch has data

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap