• Content
  • Comments (0)
  • Related articles
Nov
11
2012

How to solve Bad SubDomain SQL query on Prestashop update from 1.4.x to 1.5.x Sunday, 11 November 2012

Performing manual update from PrestaShop v1.4.x to v1.5.x may have as result in Bad SubDomain SQL query. This error occurs due to deletion of database table ps_subdomains by query that reside in prestashop/install/upgrade/sql/1.5.0.9.sql – line 10:

DROP TABLE 'PREFIX_subdomain';

 

The complete solution to resolve this issue consists in the following steps ( assuming that the PREFIX for database tables is default one, ps_table-name ) :

  • access cPanel > phpMyAdmin > your prestashop database ( _prestashop )
  • go to SQL tab and run following query for database _prestashop:
CREATE TABLE 'ps_subdomain' (
  'id_subdomain' int(10) unsigned NOT NULL auto_increment,
  'name' varchar(16) NOT NULL,
  PRIMARY KEY  ('id_subdomain')
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8;
  • after you have successfully recreated the table ps_subdomain, you need to insert [www] value with below query:
INSERT INTO 'ps_subdomain' ('id_subdomain', 'name') VALUES (1, 'www');

 

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*