Quality is delighting customers
Permalink Reply by sumalatha on September 23, 2011 at 2:23am Hi Subramanian
I never worked on E-commerce appliaction but here are the few examples I have saved for myself.
The below answer might not be the best one for you but this can give you some kind of idea on database.
Most of the e-commerce applications you are either building data or retrieving data
In e-commerce applications you are either building data up or retrieving data,shopping,order processing & purchasing.
* id — This references to the id number in the “catalogue” table
This is a table which the user can change the data stored within it. There are three ways the user can change data stored with a table within this e-commerce website. They can add, delete & update data stored in a specific table. Below are some code examples to add, delete & update data within the table.
CREATE TABLE cart (
punkisID varchar(255) NOT NULL default '',
id int(11) NOT NULL default '0',
amount int(11) NOT NULL default '1'
) TYPE=MyISAM;
$add = mysql_query("INSERT INTO cart (ID,amount)". "VALUES ('$addid','$amount')");
$delete = mysql_query("DELETE FROM cart WHERE id LIKE '$id' ")
Update Data In The Table “cart”$update = mysql_query("UPDATE cart SET amount='$amount' ");
The first selects all the data from the table specified. The second manipulates the information gathered, by ordering it by a specified field in ascending order. Finally, the query limits how many entries are displayed.
CREATE TABLE catalogue (
id int(64) NOT NULL auto_increment,
section varchar(64) NOT NULL default '',
genre varchar(64) NOT NULL default '',
artist varchar(128) NOT NULL default '',
album varchar(128) NOT NULL default '',
price float NOT NULL default '0',
description longtext NOT NULL,
label varchar(128) NOT NULL default '',
tracks longtext NOT NULL,
image varchar(128) NOT NULL default '',
rec varchar(8) NOT NULL default 'no',
KEY `id` (`id`)
) TYPE=MyISAM;
Inserting Values Into The Table “catalogue”INSERT INTO catalogue VALUES (id, 'section', 'genre', 'artist', 'album', 'price',
'description', 'label', 'tracks', 'image', 'rec');
INSERT INTO `catalogue` VALUES (35, 'Badge', 'Power-Punk', 'The Ataris', 'Rainbow',
'1', '', '', '', 'ataris_rainbow', 'yes');
Hope this helps you little bit...:))
Thanks,
Suma
Permalink Reply by Subramanian on September 23, 2011 at 10:54pm Hey sumalatha,
thanks so much for sharing.. :)
Manager QA at IdeaS Revenue Optimization
© 2013 Created by Quality Testing.