Print Page | Close Window

Problem Help Me..

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: General Discussion
Forum Description: General discussion and chat on any topic.
URL: https://forums.webwiz.net/forum_posts.asp?TID=1849
Printed Date: 29 March 2026 at 4:41am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Problem Help Me..
Posted By: farrukh
Subject: Problem Help Me..
Date Posted: 16 April 2003 at 3:52am

i m going to built the directory of webmaster like ASPIN.com but i have a problem i made three tables called tblCategory, tblComponents, tblSub_Categories.

which helps me like these
ASP > Source and Scripts >> Discussion Forums
Category >> Component >> SubCategory
my database support these kind of structure but i stuck to these

What Should i do in this type?
ASP > Source and Scripts >> Counters >> Graphical >>
Do i introduce one more table for it. or what should i do

i could have more subCategories what should i do.

Help required ne database Designer here



-------------
i have collected some nice avatars (37) and smileys (227) here you can download
http://www24.brinkster.com/webmastertool/download.html



Replies:
Posted By: michael
Date Posted: 16 April 2003 at 8:00am
As you probably don't know how many subcategories you are going to have I would not do it that way at all. Put it all in one table like follows:
Cat_ID int
Cat_Nm varchar(xx)
SubCatOf_ID int
That way, if it is a main category it has NULL as SubCatOf_ID so you display it, the you loop through the values that have SubCatOf_ID = Cat_ID and so forth. This way you save space and can have unlimited subcategories. Now depending on the database you are going to use I would encourage you to do the query in a SP which would speed up this process quite a bit. Of course there are other ways to do it but creating a table for each category is IMHO a bad idea, because you limit yourself.

-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: farrukh
Date Posted: 16 April 2003 at 12:22pm
k micheal i will do this thanx
hey i have added 1104 scripts so far in ten days and still i m adding.

what should you recommend me please check
http://www24.brinkster.com/webmastertool/db/ - http://www24.brinkster.com/webmastertool/db/

pllease give some feedbacks
http://www24.brinkster.com/webmastertool/db/index.asp - http://www24.brinkster.com/webmastertool/db/index.asp my new look


-------------
i have collected some nice avatars (37) and smileys (227) here you can download
http://www24.brinkster.com/webmastertool/download.html


Posted By: michael
Date Posted: 16 April 2003 at 12:44pm
First I would get rid of the welcome text up top, that looks cheezy (but that's just me) The layout I think is good though i am not a friend of brown, again is a matter of taste. Be careful with adding scripts that are not yours, some developers don't want there stuff listed without their conscent

-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: farrukh
Date Posted: 16 April 2003 at 11:53pm

i will send a username and password to the script holder. so if they dont want to show there scripts they can delete it. when ever i add the script an email is sended to the script holders so if they dont agree then they could delete it. The welcome text is nothing the site is in underconstruction so i will delete it later on. Still i change my current look. I dont the work in my Database now i can have unlimited SubCategories. thnx for that micheal.

Do you know ne ad-management script which i put in my site.



-------------
i have collected some nice avatars (37) and smileys (227) here you can download
http://www24.brinkster.com/webmastertool/download.html


Posted By: faubo
Date Posted: 17 April 2003 at 9:35am

I actually like the brown, but sure you should be carefull with the script thing!

If you find a javascript that highlight a word in a text, let me know!!



-------------
http://www.conhecerparaconservar.org - I don't know how to make you click here


Posted By: farrukh
Date Posted: 18 April 2003 at 12:22am
check out these http://forums.webwiz.net/forum_posts.asp?TID=1849&KW=farrukh - http://forums.webwiz.net/forum_posts.asp?TID=1849&KW=farrukh  and see my name is highlighted if you are looking to this then

add this cod to your .css
.highlighter {BACKGROUND: #CCCCCC;}

use it like <span class="highlighter">any thing </span>

if you are not looking for this kind of highlighter then i m sorry

-------------
i have collected some nice avatars (37) and smileys (227) here you can download
http://www24.brinkster.com/webmastertool/download.html


Posted By: michael
Date Posted: 18 April 2003 at 3:19pm
If you want to highlight results from a search I use a function which works quite well:
function doHighlight(my_sentence, word_to_highlight)
my_output = "<span style='background:yellow'>" & word_to_highlight & "</span>"
doHighlight = replace(lcase(my_sentence), word_to_highlight, my_output) 
End function

-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: cr*piecorn
Date Posted: 18 April 2003 at 4:39pm

mmzz ? your site sais , wwg forums , the fastest forums ... well it's a good forum but most def not fastest , take for example the .net forum on str8dogs site , it's way faster .. and forums like invision,..



-------------
Ruben Schepers
http://www.crapiecorn.be - http://www.crapiecorn.be


Posted By: Bluefrog
Date Posted: 21 April 2003 at 4:30pm

Originally posted by michael michael wrote:

...

Cat_ID int
Cat_Nm varchar(xx)
SubCatOf_ID int
That way, if it is a main category it has NULL as SubCatOf_ID so you display it, the you loop through the values that have SubCatOf_ID = Cat_ID and so forth. This way you save space and can have unlimited subcategories.

...

This might be a bit late, but...

When implementing what Michael posted above, you can get an unlimited depth as well.

e.g. Programs >> Utilities >> Compression >> Non-Lossey >> Command Line >> ETC...

What you do is keep the top level as NULL and for each sub or sub-sub category you add it to one or more categories or sub-categories. Depending upon what sort of speed you want, either an SP or an SP and a custom component would work best. You can insert all multiple entries for each sub-cat - i.e. the sub-cat belongs to sub-cat1, sub-cat3, and sub-cat14. Also add it to sub-cat5 if sub-cat14 belongs to sub-cat5. That creates a lot of records though. A custom component would let you do that ordering much faster than ASP would. So when you look through sub-cat5, you get it because sub-cat14 is a subset of sub-cat5 and your item belongs to sub-cat14. This can get rather messy though. A semi-real-time approach may work better, i.e. write an admin page that publishes (writes a file, e.g. my_list_x.inc) an include only when you choose to update it. If you are adding things administratively, then this may be a better approach than the mess I described above. The end result is that you do your query once a day versus whenever a new visitor request the page.

Hope that wasn't too much of a tangent...

 

 



Posted By: farrukh
Date Posted: 27 April 2003 at 10:51pm
 nice help guy but i have to remake my database.

or what i do is i have created the table Category >> Components >> and then Sub_Categories.

in Sub_Categories there are Sub_Cat_ID, SubCategoryName, Category_ID(from Category table), Component_Id(from component table) and then i introduce a new field by referencing your advice SubCategoryof(holds a Sub_Cat_ID).

i think by this way it is possible to create unlimited subDirectories.

Please FeedBack If i was wrong

-------------
i have collected some nice avatars (37) and smileys (227) here you can download
http://www24.brinkster.com/webmastertool/download.html



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net