Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

need help, how do i create a table in a database


isthiskene

Recommended Posts

Posted

i want to install something on my osc ive done everything except for the first step (haha) but seriously i am a novice at this and for most of you this might very simple but if someone can explain to me how to perfom this task below i will greatly appreciate it, thanks

 

the main reason am even doing this is so i can beable to add text to my shipping/return and condition of use page on my website www.kennykicks.com, because everytime i add alot of text to it it gives me an error message but if i add alittle text it is okay so am really confused about that so i guess installin this would help me by pass wutever the problem is, thanks

 

 

INSTALLATION

-----------------------------------------------------------------------------------

Create a new table in your database:

 

DROP TABLE IF EXISTS `pages`;

CREATE TABLE `pages` (

`pages_id` int(11) NOT NULL auto_increment,

`pages_title` varchar(64) NOT NULL default '',

`pages_html_text` text,

`sort_order` int(3) default NULL,

`status` int(1) NOT NULL default '1',

PRIMARY KEY (`pages_id`)

) TYPE=MyISAM AUTO_INCREMENT=9 ;

 

Insert the sample data:

 

INSERT INTO `pages` VALUES (1, 'Index', 'Put here your Index (front page) information.', 0, 1);

INSERT INTO `pages` VALUES (2, 'About Us', 'Put here your About Us information.', 1, 1);

INSERT INTO `pages` VALUES (3, 'Conditions', 'Put here your Conditions of Use information.', 1, 1);

INSERT INTO `pages` VALUES (4, 'Contact Us', 'Put here extra Contact Us information that will apear above the normal Contact form.', 1, 1);

INSERT INTO `pages` VALUES (5, 'Privacy', 'Put here your Privacy information.', 1, 1);

INSERT INTO `pages` VALUES (6, 'Shipping & Returns', 'Put here your Shipping & Returns information.', 1, 1);

 

Alter pages table

alter table `pages` add intorext char(1);

alter table `pages` add externallink varchar(255);

Posted
i want to install something on my osc ive done everything except for the first step (haha) but seriously i am a novice at this and for most of you this might very simple but if someone can explain to me how to perfom this task below i will greatly appreciate it, thanks

 

the main reason am even doing this is so i can beable to add text to my shipping/return and condition of use page on my website www.kennykicks.com, because  everytime i add alot of text to it it gives me an error message but if i add alittle text it is okay so am really confused about that so i guess installin this would help me by pass wutever the problem is, thanks

INSTALLATION

-----------------------------------------------------------------------------------

Create a new table in your database:

 

DROP TABLE IF EXISTS `pages`;

CREATE TABLE `pages` (

  `pages_id` int(11) NOT NULL auto_increment,

  `pages_title` varchar(64) NOT NULL default '',

  `pages_html_text` text,

  `sort_order` int(3) default NULL,

  `status` int(1) NOT NULL default '1',

  PRIMARY KEY  (`pages_id`)

) TYPE=MyISAM AUTO_INCREMENT=9 ;

 

Insert the sample data:

 

INSERT INTO `pages` VALUES (1, 'Index', 'Put here your Index (front page) information.', 0, 1);

INSERT INTO `pages` VALUES (2, 'About Us', 'Put here your About Us information.', 1, 1);

INSERT INTO `pages` VALUES (3, 'Conditions', 'Put here your Conditions of Use information.', 1, 1);

INSERT INTO `pages` VALUES (4, 'Contact Us', 'Put here extra Contact Us information that will apear above the normal Contact form.', 1, 1);

INSERT INTO `pages` VALUES (5, 'Privacy', 'Put here your Privacy information.', 1, 1);

INSERT INTO `pages` VALUES (6, 'Shipping & Returns', 'Put here your Shipping & Returns information.', 1, 1);

 

Alter pages table

alter table `pages` add intorext char(1);

alter table `pages` add externallink varchar(255);

 

In your hosting control panel go to phpmyadmin-> choose your database-> click on the sql tab-> copy the above sql info in the the field -> click on go. You are done. You should backup your database in the osC admin before making the changes just in case something goes wrong.

The Knowledge Base is a wonderful thing.

Do you have a problem? Have you checked out Common Problems?

There are many very useful osC Contributions

Are you having trouble with a installed contribution? Have you checked out the support thread found Here

BACKUP BACKUP BACKUP!!! You did backup, right??

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...