Jump to content

[Solved] Bad SubDomain SQL query


Recommended Posts

I know this has been covered before, but no solutions seemed to work. I rather stupidly deleted the www subdomain in admin, not I get the Bad SubDomain SQL query! and cannot even get back into admin.

I have tried

INSERT INTO `ps_subdomain` ( `id_subdomain` , `name` ) VALUES (‘1’, ‘www’);

in phpmyadmin but I get the error

#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 'INSERT INTO `ps_subdomain` ( `id_subdomain` , `name` ) VALUES (‘1’, ‘wwwâ€' at line 2

Can anyone help? Will I have to re-install to sort this out?

Thanks in advance,

Chris.

Link to comment
Share on other sites

This may be because you made a copy/paste from the forum which replace the "normal" quotes by some exotic ones.

Try the following query :

INSERT INTO `ps_subdomain`( `id_subdomain`, `name` )
VALUES (

'1', 'www'
)

Link to comment
Share on other sites

sorted. thank for the replies. Where I was going wrong was I went into the ps_subdomain table then tried to use the "insert into" command, I should have just done it from the main database.

Thanks again.

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...