Jump to content

Help required! Cant import a new table into myphpadmin


Recommended Posts

Hi

We have a major problem on our site which means customers can not create an account and place an order and we are pretty much ready to go live.

This is due to the country option in the account page not providing any drop down options, however if you try to submit without a country it brings up an error message.

We have been advised me may have a corrupt table however we are now struggling to get help on this and I am starting to lose the will!

 

When in myphpadmin we have located the file to drop ps_address_format however when we try to import the file addressformat.php located in prestashop, classes we receive the following error message

 

Error

 

SQL query:

* @copyright 2007-2012 PrestaShop SA * @version Release: $Revision: 14001 $ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * International Registered Trademark & Property of P[...]

MySQL said: b_help.png

#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 '<?php

/*

* 2007-2012 PrestaShop

*

* NOTICE OF LICENSE

*

* This source file is su' at line 1

 

If anyone can help at all I would be so so grateful. We dont even know if this will definately solve the problem but fingers crossed.

 

thanks lots and lots

Link to comment
Share on other sites

I think that you're trying to "import" a php file in the mysql database. You can't do that.

 

You can only import/export sql data that is stored in a file in the form of queries (.sql(.compression)).

Link to comment
Share on other sites

thanks so much for your replies. I really am losing the will with it and I think it is making me get confused on everything!

Can you just confirm where I will find the SQL query?

 

I think I may need to go and do some research into sql!

 

If we can not import a php file, then can you advise on how I would import the file we require. When searching for sql format in our prestashop folder it brings up lots of sql-install.php and sql-unstall.php types and numbered files e.g. 1.1.0.3sql, 1.2.0.7sql. Do I need to go through all the numbered files to see if any refer to an address format?

thanks

rachel

Link to comment
Share on other sites

Hi There,

 

 

this is the message we are getting when uploading the .sql file that we think corresponds to the corrupted table. 1.4.3.0.

We have previously dropped the table ps_address_format after being advised to do so. We have tried to recreate the table manually but do not have the information needed to complete the process.

 

Any ideas are welcome

 

Thanks

 

Rachel

Error

 

SQL query: b_help.png

UPDATE `PREFIX_address_format` SET `format` = 'firstname lastname company address1 address2 city State:name postcode Country:name' WHERE `id_country` = ( SELECT `id_country`

FROM `PREFIX_country`

WHERE `iso_code` = 'GB' ) ;

 

MySQL said: b_help.png

#1046 - No database selected

Link to comment
Share on other sites

  • 1 month later...

Solved and again by something so simple. after pulling my hair out I went back to the back office and clicked on everything and checked different boxes and tried changing settings, it was all to do with the fact i only had UK for country but it was linked correctly to the delivery section.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...