PDA

View Full Version : Simple database


rich
12-22-2005, 12:07 PM
Hello all, ive just startetd trying to set up a database, and im a bit stuck. I have the ODBC and DNC running well, but im not sure how to create the needed code. My system will be a catalogue type, about 200 products, placed in 22 sections. My fields are -

ID (200 odd)
Sections (22)
Item_No
Product_title
Description
Pictures

My idea is to have a main index page, with 22 rollover images to the left of the page. The rollovers will then be linked to other pages - and these ones will then show a list of products for each section. This list, will be linked to an individual product, which will have a full description, and images.

Im not entirely sure how to create the needed code for something like this - can anyone help? Any possible links would be useful. Thanks for your time :)

davidj
12-22-2005, 12:38 PM
i take you have built a database and dreamweaver is comunicating with it

your products table needs a section column to sort the products

you dont need 22 pages just 1 other

you will change the recordset dynamicaly depending on what button/link you click. The link will pass a value to the results page and therefore filter the recordset accordingly

You need to do some learnin.

Try dreamweaver recordset tutorials

Creative Insanity
12-22-2005, 05:40 PM
You didn't mention what the database system is so I am assuming MySQL.

So copy and paste this into the sql tab of phpmyadmin (or any sql client) once you have created the database.
CREATE TABLE `products` (
`ID` mediumint(10) NOT NULL auto_increment,
`sections` varchar(40) NOT NULL default '',
`item_no` varchar(4) NOT NULL default '',
`description` varchar(255) NOT NULL default '',
`image` varchar(50) NOT NULL default '',
`product_title` varchar(40) NOT NULL default '',
PRIMARY KEY (`ID`)
) TYPE=MyISAM AUTO_INCREMENT=1;