Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

I NEED HELP WITH A MySQL DATABASE


cherven

Recommended Posts

Posted

Hi, i just installed the Loaded Snapshot from http://phesis.co.uk

i want to add my Products from my other shop's Database to this Datadase, but i don't know that much about MySQL, I tried to do it my self, and i had no luck, i keep on messing it up every time i try to do it, i have been working on it for 6 Hours now, and i'm getting no wheres.

 

can someone please help me out?

 

I use PHPMyAdmin to work on the database, so if anyone knows how do do this, and can help me out, that would be great.

 

anyone who helps me out, they will receive a FREE Gift Voucher worth $5.00

Thank You

Sean Cherven.

Posted

Are you just upgrading from one version of osCommerce to the Loaded Snapshot?

 

Or are the products in another e-commerce package?

 

Either way, what is going wrong?

 

Jon.

Posted

What i need to do is add all my data from the MySQL Database to another Database, but the other Database has a LOT of Contributions in that Database, i have tried to taking the old database and copying it to the new one and then i ran the install script and did a Update and it scrowed up every thing i had to start over again then i did the same but this time i ran the New Install, and it still didnt work. so i think i need to import the products and other stuff manualy into the database. and i dont know how to do that.

 

can you help me do it? you will receive a FREE $5.00 Gift Voucher if you can figure it out. that will be my way of paying you to do this for me. i have over 234 Products you can choose from, goto: http://www.jandsgiftshop.com to check out all the products i have. Note: for somereason my site is not showing the Pictures, this will be fixed hopfully within the next hour. this is my working version of the shop. witch i'm trying to upgrade to Ian's Loaded Version at: http://phesis.co.uk. can you please help me do this?

 

Thank You

Sean Cherven

Posted

Hi,

 

go into phpmyadmin, select you database where all your data is. click on export. Select all databases and select "structure and data". Select also Add 'drop table'

Complete inserts

Extended inserts

 

then click OK.

 

mark all the text and copy it with STRG + C

 

Go now in your other phpmyadmin and select your new database. Click on SQL and paste your text in the text field.

 

click OK

 

Thats all

Good luck

 

Milchbazi

Posted

I have phpMyAdmin Version 2.2.6

 

It dont have any Export options, but i can download the database as a .sql file.

 

it says nothing about STRG + C

 

It does have "structure and data" "drop table"

"Complete inserts"

"Extended inserts"

 

 

What do i do now?

Posted

One more question, do i have to Create a New database and copy the old Database to it? or do i install the the Loaded Snapshot from Ian to a new database, and then copy the old database to it?

 

can you explane to me what thease Options below Mean in phpMyAdmin?

 

The option are:

Empty

Drop

Properties

Insert

Select

Browse

Add 'drop table'

Complete inserts

Extended inserts

& Enclose table and field names with backquotes

 

 

Can you please tell me what all thease mean?

 

Thank You. :wink:

Posted

Ok, lets try again.

 

Download you Database as a zip file. Extract the zip file. there must be a file called "yourDatabaseName.sql".

 

Open the file with a text editor like Wordpad and select the hole text. Copy the text ( EDIT -> COPY ) and go to your new database. Select SQL (may be INSERT in your version) and click with your right mousebutton into the text fielt. Select past in the menu. Then click ok. That's all.

Posted

To your Questions: Sorry, its to much to explain. look at www.phpmyadmin.net

 

PS: If you want to update only you shouldn't select ADD DROP, because your data is lost then. And if your tables already exist select DATA ONLY.

 

PS: It cannot be INSERT. Look if you find SQL or an other link to a big textfield.

Posted

PSS: STRG + C = Copy. Select your text. press the button STRG on your keyboard and C. To paste the text press STRG + V

Posted

What if only Some of the Tables exist, and some don't?

 

do i select structure and data? or still just Data?

 

Thank You

Sean Cherven

Posted

I tried what you told me to do and it gave me a error saying

Error



SQL-query :  



INSERT INTO address_book (customers_id, address_book_id, entry_gender, entry_company, entry_firstname, entry_lastname, entry_street_address, entry_suburb, entry_postcode, entry_city, entry_state, entry_country_id, entry_zone_id) VALUES (





""All the information goes here"" "Im not desplaying it for Security reasons"



)





MySQL said: 





Duplicate entry '1-5' for key 1

 

 

What do i do now? i tried it with:

add 'drop tables'

Complete inserts

Extended inserts

 

and without add 'drop tables'

and only the other two

 

and i tried with only

complete inserts

 

and (i think) i tried it with only

extended inserts

 

can you please help me out again?

 

Thank You.

Sean Cherven

Posted

Could you post or send me your database? Say me which of your tables already exist and I try to prepare them.

Posted
Error

 

SQL-query :

 

INSERT INTO address_book (customers_id, address_book_id, entry_gender, entry_company, entry_firstname, entry_lastname, entry_street_address, entry_suburb, entry_postcode, entry_city, entry_state, entry_country_id, entry_zone_id) VALUES (

 

 

""All the information goes here"" "Im not desplaying it for Security reasons"

 

)

 

 

MySQL said:

 

 

Duplicate entry '1-5' for key 1

 

You got this error, because your database table already existed. So you have to create the missing tables and than to update all of them.

 

But the best way is if you give me your database!

Posted

I sent you a Privite Message, you havent responded to it, when will the Database be all set?

 

Thank You

Sean Cherven

Posted

Are both of these databases osCommerce databases? If so, it shouldn't be hard at all.

 

All you need to do is install the database for the version you are using, export your old osCommerce database and import it into the new database structure.

 

You DO want to delete any pre-installed products, customers, etc... that you do not want or need from the new osCommerce installation. This may help with the duplicate data problem.

 

You DO NOT want the drop table option on export because if the database structure has changed then you will be dropping the new database structure and replacing it with the old database structure when you import; which will and likely has screwed things up.

 

If you have command line/ shell access to mysql I can give you the commands you need to dump your database correctly. It's pretty easy and I know it will work right. phpMyAdmin may not provide all of the options for data export that you need for this procedure. Once you have your data exported correctly it will be a breeze to import it.

 

Can you buy anything on your site for $5.00?

*edit*

Posted
Error  

 

SQL-query :  

 

INSERT INTO address_book (customers_id, address_book_id, entry_gender, entry_company, entry_firstname, entry_lastname, entry_street_address, entry_suburb, entry_postcode, entry_city, entry_state, entry_country_id, entry_zone_id) VALUES (  

 

 

""All the information goes here"" "Im not desplaying it for Security reasons"  

 

)  

 

 

MySQL said:  

 

 

Duplicate entry '1-5' for key 1

 

You got this error, because your database table already existed. So you have to create the missing tables and than to update all of them.

 

That's incorrect, you get this error when the same Key identifier exists for a column in a table. For example, if you have a customer_id of '1' in a table in the new database and then try to import your old osC data that has a table of the same name also has a customer_id of '1' you will get this error.

*edit*

Posted

PS - in the case above, you had a values 1,2,3,4, and 5 existing for the customers_id field (which is defined as a Key field with non-duplicating values) in both the new database and the older database you were trying to import.

 

All you need to do is either change the numbers in the values you are trying to import or delete the customers 1-5 from the database you are trying to get your old data into.

*edit*

Posted

Thanks every body, i got it going now. i figured out a way to import it. thanks.

 

no you can't buy anything for $5.00 or less i think you can for $10 and up, but not for $5.

 

thanks for all your help.

 

Sean Cherven

  • 5 years later...
Posted

I followed these steps, and after importing my older database into the newer store via PHPMyAdmin, I get this error:

 

1054 - Unknown column 's.public_flag' in 'where clause'

 

select count(*) as total from orders o, orders_status s where o.customers_id = '65' and o.orders_status = s.orders_status_id and s.language_id = '1' and s.public_flag = '1'

 

[TEP STOP]

 

I have done 3 clean installs of OsCommerce and could really use some help. I thank you in advance,

 

H

Posted

OK, found that fix and applied it.

 

However, I now get these php errors. Again, this is after importing an older database into the newer store:

 

Warning: shipping(includes/languages/english/modules/shipping/ups.php) [function.shipping]: failed to open stream: No such file or directory in /home/southamc/public_html/osc/includes/classes/shipping.php on line 36

 

Warning: shipping(includes/languages/english/modules/shipping/ups.php) [function.shipping]: failed to open stream: No such file or directory in /home/southamc/public_html/osc/includes/classes/shipping.php on line 36

 

Warning: shipping() [function.include]: Failed opening 'includes/languages/english/modules/shipping/ups.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/southamc/public_html/osc/includes/classes/shipping.php on line 36

 

Warning: shipping(includes/modules/shipping/ups.php) [function.shipping]: failed to open stream: No such file or directory in /home/southamc/public_html/osc/includes/classes/shipping.php on line 37

 

Warning: shipping(includes/modules/shipping/ups.php) [function.shipping]: failed to open stream: No such file or directory in /home/southamc/public_html/osc/includes/classes/shipping.php on line 37

 

Warning: shipping() [function.include]: Failed opening 'includes/modules/shipping/ups.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/southamc/public_html/osc/includes/classes/shipping.php on line 37

 

Fatal error: Cannot instantiate non-existent class: ups in /home/southamc/public_html/osc/includes/classes/shipping.php on line 39

Posted

Ditto here. I've been fighting with a database for a new customer. Gave up on their server and am trying it on some of my web space.

 

I can tell the original DB had been monkey'd with... there were different admin tables, etc. from a contrib the last owner installed. (easy populate and a froogle contrib, I think)

 

I guess I'll try the register globals patch. Already turned off the SSL.

 

I followed these steps, and after importing my older database into the newer store via PHPMyAdmin, I get this error:

 

1054 - Unknown column 's.public_flag' in 'where clause'

 

select count(*) as total from orders o, orders_status s where o.customers_id = '65' and o.orders_status = s.orders_status_id and s.language_id = '1' and s.public_flag = '1'

 

[TEP STOP]

 

I have done 3 clean installs of OsCommerce and could really use some help. I thank you in advance,

 

H

Archived

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

×
×
  • Create New...