Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

how to add my own table in database?


developer_x

Recommended Posts

Posted

hi all,

 

i want to add a new table to the mysql database. i will be retrieving data from one of its fields to display them as a drop down menu box. this drop down menu box will be in the search info box.

i also need to know how can we make available a certain table's fields and data to a certain php page?

Irfan,

Posted

Open one of the contributions that creates a table and see by example. Here's a small example

CREATE TABLE some_table (
 date datetime NOT NULL default '0000-00-00 00:00:00',
 some_name varchar(100) default NULL
);

Any page in your shop has access to the database (provising it has the proper includes). Just do a query on the table to get the data.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Posted

OK, your title asked how to add it to the db - thus my answer. As far as inclucding a certain table on a certain page, it may again be a lack of understanding as far as what you mean, but I've answered the question already. When you open whatever file you want the table data on, just query the db. Are asking how to quey the db?

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Posted
OK, your title asked how to add it to the db - thus my answer. 

yes u seem 2 be rite. apologies :)

 

As far as inclucding a certain table on a certain page, it may again be a lack of understanding as far as what you mean, but I've answered the question already. When you open whatever file you want the table data on, just query the db. 

 

oh dats gr8. i though there might be some restrictions on some tables. like....the pages of customers wont be able to use the table used for storing administrator's info. anyways it isn't a serious issue.

thanx for response.

Irfan,

Posted
yes u seem 2 be rite. apologies :)

oh dats gr8. i though there might be some restrictions on some tables. like....the pages of customers wont be able to use the table used for storing administrator's info. anyways it isn't a serious issue.

thanx for response.

 

 

dat was easy. i am done away with it.

Irfan,

Archived

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

×
×
  • Create New...