How to run a sql script using mysql & php to add an oscommerce paypal module

Hello

I am trying to add a paypal pro module to a oscommerce cart.

Here are the instructions

------------------------------------------------------------------------
osCommerce PayPal Website Payments Pro, U.S. Edition

This module implements PayPal Website Payments Pro, including Direct Payment and Express Checkout, for the U.S.
Installation

To install this module, back up your existing installation to a safe place and then just copy the included catalog/ directory over your existing osCommerce files. This will replace the modified files and add the new files. However, if you have modified your osCommerce installation, you will need to manually compare the new files with your existing ones, and possible manually merge the changes.

If you are installing osCommerce for the first time, you can find installation instructions at http://www.oscommerce.info/kb/225, or http://www.oscommerce.info/kb/osCommerce/Installation_and_Upgrades/41 depending on your environment. You will need to turn on register_globals and enable the mysql extension in php.ini, at a minimum.

Once you have copied the files, you need to run a small SQL script. It is paypal_wpp.sql in this directory. The command to run it may vary depending on your database name and user, but will look something like:

mysql -u oscommerce -p oscommerce < paypal_wpp.sql

This assumes that your database user is named "oscommerce", and the name of the database is "oscommerce". You will be prompted for the database user's password.
------------------------------------------------------------------------

I have done all the coping and just need to know how to run the "small SQL script." I have the correct username and database name.

Do I run this in the Query Window of MyPHPAdmin of the database? I have zero knowledge of mysql and php but know enough to be dangerous with MSsql and Access.

Also here is the script in paypal_wpp.sql

------------------------------------------------------------------
ALTER TABLE `customers` ADD `customers_paypal_payerid` VARCHAR( 20 );
ALTER TABLE `customers` ADD `customers_paypal_ec` TINYINT (1) UNSIGNED DEFAULT '0' NOT NULL;
-------------------------------------------------------------------

Thanks for any help on this,

coma12
LVL 1
coma12Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

glcumminsCommented:
The following command:

   mysql -u oscommerce -p oscommerce < paypal_wpp.sql

is merely a command-line way to import the data in paypal_wpp.sql into your database. If you already have phpMyAdmin installed, you don't need to use the command. Just click on the Import tab, select the location of 'paypal_wpp.sql', and click "Go". This will import the data for you.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Steve BinkCommented:
>>> Do I run this in the Query Window of MyPHPAdmin of the database?

That's exactly it.  You'll have to make sure you are logged in with a user account owning access to alter those tables.  
0
glcumminsCommented:
Careful there. You don't want to run 'mysql -u oscommerce -p oscommerce < paypal_wpp.sql' in the query window. That is not a query. The contents of the .sql file can be run in the query window, but not the command itself.
0
coma12Author Commented:
glcummins,

Thanks! It worked though I had to select the customers table then import the paypal_wpp.sql script into it.

coma12
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
E-Commerce

From novice to tech pro — start learning today.