473,569 Members | 2,490 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Categories with subcategories in Columns ?

1 New Member
hi i am new to php and wants to display categories with all subcategories under each category and display in 3 or 4 columns.
In database i have two tables one is for category and other is for sub-category.

Kindly Do A Favour Please
Aug 11 '10 #1
1 1285
Atli
5,058 Recognized Expert Expert
Hey.

First of all, you want to design your HTML. Best to do that with static data at first, just to make sure it will look OK once you populate it with the real data.

Then you use PHP to fetch the real data from your database and have it replace the static data with the real data.

Try it. Post what you have here and we will guide you through it.
Also, we will need to know what type of database you are using, and how your database is structured.
Aug 11 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
18273
by: Brian | last post by:
Greetings, I'm working on a project that involved that has need of a categorization system. Logically speaking, the system will have elements, these elements will belong to at least a single category, sometimes more, additionally, categories may also be members of any number of categories. Well -- Thats the vision at least. I'm looking...
2
3517
by: Troy Lynch | last post by:
I'm working on writing a website which I need to have lists of products listed in categories and subcategories, and need to keep track of whats in the tree. Like how many products from the root all the way down through the subcategories. I was thinking maybe in each category it would have a field which lists all the root categories. I hope...
4
3222
by: Bill | last post by:
I've got a bookstore I'm developing, and I wanted to list all the categories on the home page of the site. However, there are so many, that they now extend way below the screen, making the page look sloppy. I want, therefore, to limit the number of categories on the home page, to a few general categores, then clicking on one will reveal the...
0
3239
by: Ralph Guzman | last post by:
TASK: I have to generate a report with all categories, subcategories and products in database. PROBLEM: I want to write one query that will return: 1. category 2. subcategory: determined by parent_id 3. products in each category or subcategory.
8
2360
by: Brian | last post by:
This is causing me to not be able to create a relation in my dataset. Here's my code: dc1 = ds.Tables .Columns ; dc2 = ds.Tables .Columns ; dr1 = new System.Data.DataRelation ("categories2subcategories", dc1, dc2); ds.Relations.Add (dr1); dc1 always works fine. dc2 always returns null. There ARE records in
13
3860
by: hornedw | last post by:
I have been working on a ecommerce website for myself. What I needed some assistance on was when i was trying to display the categories/subcategories for the different products. I decided to use the modified preorder tree transversal algorithm. What I wanted was on the first page is to display the catogories as follows Books (35)...
3
4581
Staria
by: Staria | last post by:
Hi... I'm currently working on a project where I would like to have Categories and SubCategories. I've banged my head on this for several days, but can't seem to get this the way I want it to display. Thought I would see if I might be able to get a little help. What I would like is for my code to print out the categories/subcategories...
1
1588
by: wfsmith | last post by:
Sorry for the confusing subject. Here's what im doing: I have a table of products. Products have N categories and subcategories. Right now its 4. But there could be more down the line so it needs to be extensible. So ive created a product table. Then a category table that has many categories of products, of which a product can...
2
2651
by: itpvision | last post by:
Hello, I have a link navigation of categories retrieved from the database, while I know how to display subcategories based on category link clicked with classical approach, I want to do this with ajax, The problem is with the classical style,I know the GET sent and the row im in with the category, so by simple comparison, I know how to...
1
2165
by: myselfrandhawa | last post by:
Hi i have the following tables and i want to show categories and subcategories underneath them and count how many products exist in category and subcategory: i am allowing multiple categories for a single product table structure as: productcategories CREATE TABLE .( NULL, NULL, IDENTITY(1,1) NOT NULL,
0
7703
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7618
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7926
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8132
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7678
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7982
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5222
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3656
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2116
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.