I am following this guide: http://www.b-planet.com/VirtueMart/paypal-patch.html
but get stuck at "Create the database Table using the create_temporary_order_table.sql script included in the downloaded zip file."
My virtuemart with its Joomla installation is located in the /shop/ subfolder of my website based on another joomla instance installed in the root folder.
I uploaded and unpacked the scrip in the /shop/ folder but from there, I can go nowhere.
I login to PHPmyAdmin and in the SQL tab I am trying to run
mysql <\shop\create_temporary_order_table.sql
or
mysql create_temporary_order_table.sql
or many other combinations, but every time I am getting
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysql <\shop\create_temporary_order_table.sql' at line 1
Can somebody help me with this, please?
What is the mysql statement that is causing the problem?
Quote from: stinga on March 19, 2010, 13:56:23 PM
What is the mysql statement that is causing the problem?
I am not sure what do you mean. I gave all the details I can think of in my initial post.
Anyone?
G'day,
No you haven't.
You have given us the name of the script that is executed.
mysql will show you the statement that is failing.
Some of the line in error will be on the end of the error msg, you posted, which has been cut off.
Well, I do not think the problem is with the script but the way I am trying to execute it. I have no idea how to do it and I mostly guessed, probably wrongly.
Therefore, I think the solution is proper command I need to input into SQL tab of phpMyadmin, but I have no idea how it should look, given virtuemart installation of joomla is in a subdirectory.
Ah!,
I think I know what the problem is... you need to tell mysql what database to use.
What is you database called? Then you need.
mysql db_name <create_temporary_order_table.sql
You are telling mysql that the name of the database to connect to is create_temporary_order_table.sql
Or you can connect to your DB with
mysql
mysql> use DB_NAME
mysql> \. create_temporary_order_table.sql
mysql> exit
Thank you. This is the output of this command:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysql zzz033_shop <create_temporary_order_table.sql' at line 1
mysql zzz033_shop < create_temporary_order_table.sql
G'day,
Are you on a linux host? How are you connecting to mysql?
On a linux host, you would enter mysql, you might need a username and password.
It looks like you are already in mysql.
I am using phpMyAdmin from cpanel, tab named SQL.
G'day,
Oh! I am not so hot on cpanel, I am more a 'get your hands dirty at the OS' type of hacker :-)
If you are using cpanel you won't be able to use the script, that was designed to be run from a command prompt.
Open the .sql file you have in your favorite editor an cat-n-paste the commands out of it and paste them into phpadmin. That should work.