nkrgupta
07-07-2005, 08:37 PM
HI,
I am dealing with two MySQL tables which have structures as follows -
table 1
Column Name - URL Column Name - Caption
http://www.abcd.com/anniversary/index.html Anniversary
http://www.abcd.com/birthday/index.html BirthDay
http://www.abcd.com/christmas/index.html Christmas
http://www.abcd.com/milestones/index.html Milestones
http://www.abcd.com/encouragement/index.html Encouragement
http://www.abcd.com/goodluck/index.html GoodLuck
table2
Column Name - URL Column Name - Caption
http://www.abcd.com/anniversary/1st/index.html First Anniversary
http://www.abcd.com/anniversary/25th/index.html Silver Jubilee
http://www.abcd.com/anniversary/50th/index.html Golden Jubilee
http://www.abcd.com/Christmas/wishes/index.html Christmas Wishes
http://www.abcd.com/milestones/graduation/index.html Graduation
http://www.abcd.com/milestones/winning/index.html Winner
http://www.abcd.com/encouragement/index.html Encouragement
http://www.abcd.com/encouragement/health/index.html Health & Wellness
http://www.abcd.com/encouragement/health/awareness/index.html Awareness
http://www.abcd.com/encouragement/health/awareness/breast_cancer/index.html Breast Cancer
http://www.abcd.com/encouragement/health/awareness/aids/index.html Aids Awareness
The table 1 contains about 100 rows with unique url's which are the main CATEGORY and table 2 contains more than 4000 url's that are sub
categories and sub-sub-categories of url's in table one. What I want is to generate an HTML report using PERL, which contains the caption
for each url in table 2, in the format as below-
for url - http://www.abcd.com/milestones/winning/index.html
caption -- Milestones(taken from table one) : Graduation (taken rom table 2)
for url - http://www.abcd.com/encouragement/health/awareness/breast_cancer/index.html
caption should be -- Encouragement (taken from table one) : Health & Wellness (taken rom table
2):Awareness (taken form table 2): Breast Cancer (taken from table2)
I think i'll have to make use of hashes (and maybe multi-level hashes) and execute recursive loops with nested SQL statements..!! But noclue
from where to start.. Any ideas??
Thanks a lot
Naveen
I am dealing with two MySQL tables which have structures as follows -
table 1
Column Name - URL Column Name - Caption
http://www.abcd.com/anniversary/index.html Anniversary
http://www.abcd.com/birthday/index.html BirthDay
http://www.abcd.com/christmas/index.html Christmas
http://www.abcd.com/milestones/index.html Milestones
http://www.abcd.com/encouragement/index.html Encouragement
http://www.abcd.com/goodluck/index.html GoodLuck
table2
Column Name - URL Column Name - Caption
http://www.abcd.com/anniversary/1st/index.html First Anniversary
http://www.abcd.com/anniversary/25th/index.html Silver Jubilee
http://www.abcd.com/anniversary/50th/index.html Golden Jubilee
http://www.abcd.com/Christmas/wishes/index.html Christmas Wishes
http://www.abcd.com/milestones/graduation/index.html Graduation
http://www.abcd.com/milestones/winning/index.html Winner
http://www.abcd.com/encouragement/index.html Encouragement
http://www.abcd.com/encouragement/health/index.html Health & Wellness
http://www.abcd.com/encouragement/health/awareness/index.html Awareness
http://www.abcd.com/encouragement/health/awareness/breast_cancer/index.html Breast Cancer
http://www.abcd.com/encouragement/health/awareness/aids/index.html Aids Awareness
The table 1 contains about 100 rows with unique url's which are the main CATEGORY and table 2 contains more than 4000 url's that are sub
categories and sub-sub-categories of url's in table one. What I want is to generate an HTML report using PERL, which contains the caption
for each url in table 2, in the format as below-
for url - http://www.abcd.com/milestones/winning/index.html
caption -- Milestones(taken from table one) : Graduation (taken rom table 2)
for url - http://www.abcd.com/encouragement/health/awareness/breast_cancer/index.html
caption should be -- Encouragement (taken from table one) : Health & Wellness (taken rom table
2):Awareness (taken form table 2): Breast Cancer (taken from table2)
I think i'll have to make use of hashes (and maybe multi-level hashes) and execute recursive loops with nested SQL statements..!! But noclue
from where to start.. Any ideas??
Thanks a lot
Naveen