Magento 1 error: SQLSTATE[42000]: Syntax error or access violation: 1064









up vote
-1
down vote

favorite












I recently changed hosting provider for my Magento 1.9.3.7 store, and now i get this error message when trying to enter the site. Does anyone have any thoguhts about what the issue may be?



The server is running on php 5.6 and mysql 5.7.



 SQLSTATE[42000]: Syntax error or access violation: 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 ')' at line 1, query was: SELECT `core_store`.`website_id` FROM `core_store` WHERE (store_id = )

Trace:
#0 /home/216361.cloudwaysapps.com/tjgtaadqkd/public_html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/216361.cloudwaysapps.com/tjgtaadqkd/public_html/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /home/216361.cloudwaysapps.com/tjgtaadqkd/public_html/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 /home/216361.cloudwaysapps.com/tjgtaadqkd/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT `core_st...', Array)
#4 /home/216361.cloudwaysapps.com/tjgtaadqkd/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(504): Zend_Db_Adapter_Pdo_Abstract->query('SELECT `core_st...', Array)
#5 /home/216361.cloudwaysapps.com/tjgtaadqkd/public_html/lib/Zend/Db/Adapter/Abstract.php(828): Varien_Db_Adapter_Pdo_Mysql->query(Object(Varien_Db_Select), Array)
#6 /home/216361.cloudwaysapps.com/tjgtaadqkd/public_html/app/code/local/Amasty/GeoipRedirect/Model/Fpc/Front.php(288): Zend_Db_Adapter_Abstract->fetchOne(Object(Varien_Db_Select))
#7 /home/216361.cloudwaysapps.com/tjgtaadqkd/public_html/app/code/local/Amasty/GeoipRedirect/Model/Fpc/Front.php(51): Amasty_GeoipRedirect_Model_Fpc_Front->getWebsiteId(false)
#8 /home/216361.cloudwaysapps.com/tjgtaadqkd/public_html/app/code/core/Mage/Core/Model/Cache.php(687): Amasty_GeoipRedirect_Model_Fpc_Front->extractContent(false)
#9 /home/216361.cloudwaysapps.com/tjgtaadqkd/public_html/app/code/core/Mage/Core/Model/App.php(351): Mage_Core_Model_Cache->processRequest()
#10 /home/216361.cloudwaysapps.com/tjgtaadqkd/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#11 /home/216361.cloudwaysapps.com/tjgtaadqkd/public_html/index.php(102): Mage::run('', 'store')
#12 main









share|improve this question





















  • No value is being passed for store_id in WHERE (store_id = )
    – Madhur Bhaiya
    Nov 10 at 11:01






  • 1




    Use prepared statements and this won't happen (you are adding in a variable with no value into the SQL string - most likely)
    – Nigel Ren
    Nov 10 at 11:57










  • Thanks Nigel Ren, this solved it for me!
    – Tobias Bindemo
    yesterday














up vote
-1
down vote

favorite












I recently changed hosting provider for my Magento 1.9.3.7 store, and now i get this error message when trying to enter the site. Does anyone have any thoguhts about what the issue may be?



The server is running on php 5.6 and mysql 5.7.



 SQLSTATE[42000]: Syntax error or access violation: 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 ')' at line 1, query was: SELECT `core_store`.`website_id` FROM `core_store` WHERE (store_id = )

Trace:
#0 /home/216361.cloudwaysapps.com/tjgtaadqkd/public_html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/216361.cloudwaysapps.com/tjgtaadqkd/public_html/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /home/216361.cloudwaysapps.com/tjgtaadqkd/public_html/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 /home/216361.cloudwaysapps.com/tjgtaadqkd/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT `core_st...', Array)
#4 /home/216361.cloudwaysapps.com/tjgtaadqkd/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(504): Zend_Db_Adapter_Pdo_Abstract->query('SELECT `core_st...', Array)
#5 /home/216361.cloudwaysapps.com/tjgtaadqkd/public_html/lib/Zend/Db/Adapter/Abstract.php(828): Varien_Db_Adapter_Pdo_Mysql->query(Object(Varien_Db_Select), Array)
#6 /home/216361.cloudwaysapps.com/tjgtaadqkd/public_html/app/code/local/Amasty/GeoipRedirect/Model/Fpc/Front.php(288): Zend_Db_Adapter_Abstract->fetchOne(Object(Varien_Db_Select))
#7 /home/216361.cloudwaysapps.com/tjgtaadqkd/public_html/app/code/local/Amasty/GeoipRedirect/Model/Fpc/Front.php(51): Amasty_GeoipRedirect_Model_Fpc_Front->getWebsiteId(false)
#8 /home/216361.cloudwaysapps.com/tjgtaadqkd/public_html/app/code/core/Mage/Core/Model/Cache.php(687): Amasty_GeoipRedirect_Model_Fpc_Front->extractContent(false)
#9 /home/216361.cloudwaysapps.com/tjgtaadqkd/public_html/app/code/core/Mage/Core/Model/App.php(351): Mage_Core_Model_Cache->processRequest()
#10 /home/216361.cloudwaysapps.com/tjgtaadqkd/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#11 /home/216361.cloudwaysapps.com/tjgtaadqkd/public_html/index.php(102): Mage::run('', 'store')
#12 main









share|improve this question





















  • No value is being passed for store_id in WHERE (store_id = )
    – Madhur Bhaiya
    Nov 10 at 11:01






  • 1




    Use prepared statements and this won't happen (you are adding in a variable with no value into the SQL string - most likely)
    – Nigel Ren
    Nov 10 at 11:57










  • Thanks Nigel Ren, this solved it for me!
    – Tobias Bindemo
    yesterday












up vote
-1
down vote

favorite









up vote
-1
down vote

favorite











I recently changed hosting provider for my Magento 1.9.3.7 store, and now i get this error message when trying to enter the site. Does anyone have any thoguhts about what the issue may be?



The server is running on php 5.6 and mysql 5.7.



 SQLSTATE[42000]: Syntax error or access violation: 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 ')' at line 1, query was: SELECT `core_store`.`website_id` FROM `core_store` WHERE (store_id = )

Trace:
#0 /home/216361.cloudwaysapps.com/tjgtaadqkd/public_html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/216361.cloudwaysapps.com/tjgtaadqkd/public_html/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /home/216361.cloudwaysapps.com/tjgtaadqkd/public_html/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 /home/216361.cloudwaysapps.com/tjgtaadqkd/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT `core_st...', Array)
#4 /home/216361.cloudwaysapps.com/tjgtaadqkd/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(504): Zend_Db_Adapter_Pdo_Abstract->query('SELECT `core_st...', Array)
#5 /home/216361.cloudwaysapps.com/tjgtaadqkd/public_html/lib/Zend/Db/Adapter/Abstract.php(828): Varien_Db_Adapter_Pdo_Mysql->query(Object(Varien_Db_Select), Array)
#6 /home/216361.cloudwaysapps.com/tjgtaadqkd/public_html/app/code/local/Amasty/GeoipRedirect/Model/Fpc/Front.php(288): Zend_Db_Adapter_Abstract->fetchOne(Object(Varien_Db_Select))
#7 /home/216361.cloudwaysapps.com/tjgtaadqkd/public_html/app/code/local/Amasty/GeoipRedirect/Model/Fpc/Front.php(51): Amasty_GeoipRedirect_Model_Fpc_Front->getWebsiteId(false)
#8 /home/216361.cloudwaysapps.com/tjgtaadqkd/public_html/app/code/core/Mage/Core/Model/Cache.php(687): Amasty_GeoipRedirect_Model_Fpc_Front->extractContent(false)
#9 /home/216361.cloudwaysapps.com/tjgtaadqkd/public_html/app/code/core/Mage/Core/Model/App.php(351): Mage_Core_Model_Cache->processRequest()
#10 /home/216361.cloudwaysapps.com/tjgtaadqkd/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#11 /home/216361.cloudwaysapps.com/tjgtaadqkd/public_html/index.php(102): Mage::run('', 'store')
#12 main









share|improve this question













I recently changed hosting provider for my Magento 1.9.3.7 store, and now i get this error message when trying to enter the site. Does anyone have any thoguhts about what the issue may be?



The server is running on php 5.6 and mysql 5.7.



 SQLSTATE[42000]: Syntax error or access violation: 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 ')' at line 1, query was: SELECT `core_store`.`website_id` FROM `core_store` WHERE (store_id = )

Trace:
#0 /home/216361.cloudwaysapps.com/tjgtaadqkd/public_html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/216361.cloudwaysapps.com/tjgtaadqkd/public_html/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /home/216361.cloudwaysapps.com/tjgtaadqkd/public_html/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 /home/216361.cloudwaysapps.com/tjgtaadqkd/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT `core_st...', Array)
#4 /home/216361.cloudwaysapps.com/tjgtaadqkd/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(504): Zend_Db_Adapter_Pdo_Abstract->query('SELECT `core_st...', Array)
#5 /home/216361.cloudwaysapps.com/tjgtaadqkd/public_html/lib/Zend/Db/Adapter/Abstract.php(828): Varien_Db_Adapter_Pdo_Mysql->query(Object(Varien_Db_Select), Array)
#6 /home/216361.cloudwaysapps.com/tjgtaadqkd/public_html/app/code/local/Amasty/GeoipRedirect/Model/Fpc/Front.php(288): Zend_Db_Adapter_Abstract->fetchOne(Object(Varien_Db_Select))
#7 /home/216361.cloudwaysapps.com/tjgtaadqkd/public_html/app/code/local/Amasty/GeoipRedirect/Model/Fpc/Front.php(51): Amasty_GeoipRedirect_Model_Fpc_Front->getWebsiteId(false)
#8 /home/216361.cloudwaysapps.com/tjgtaadqkd/public_html/app/code/core/Mage/Core/Model/Cache.php(687): Amasty_GeoipRedirect_Model_Fpc_Front->extractContent(false)
#9 /home/216361.cloudwaysapps.com/tjgtaadqkd/public_html/app/code/core/Mage/Core/Model/App.php(351): Mage_Core_Model_Cache->processRequest()
#10 /home/216361.cloudwaysapps.com/tjgtaadqkd/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#11 /home/216361.cloudwaysapps.com/tjgtaadqkd/public_html/index.php(102): Mage::run('', 'store')
#12 main






php mysql magento cloudways






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 10 at 11:00









Tobias Bindemo

3619




3619











  • No value is being passed for store_id in WHERE (store_id = )
    – Madhur Bhaiya
    Nov 10 at 11:01






  • 1




    Use prepared statements and this won't happen (you are adding in a variable with no value into the SQL string - most likely)
    – Nigel Ren
    Nov 10 at 11:57










  • Thanks Nigel Ren, this solved it for me!
    – Tobias Bindemo
    yesterday
















  • No value is being passed for store_id in WHERE (store_id = )
    – Madhur Bhaiya
    Nov 10 at 11:01






  • 1




    Use prepared statements and this won't happen (you are adding in a variable with no value into the SQL string - most likely)
    – Nigel Ren
    Nov 10 at 11:57










  • Thanks Nigel Ren, this solved it for me!
    – Tobias Bindemo
    yesterday















No value is being passed for store_id in WHERE (store_id = )
– Madhur Bhaiya
Nov 10 at 11:01




No value is being passed for store_id in WHERE (store_id = )
– Madhur Bhaiya
Nov 10 at 11:01




1




1




Use prepared statements and this won't happen (you are adding in a variable with no value into the SQL string - most likely)
– Nigel Ren
Nov 10 at 11:57




Use prepared statements and this won't happen (you are adding in a variable with no value into the SQL string - most likely)
– Nigel Ren
Nov 10 at 11:57












Thanks Nigel Ren, this solved it for me!
– Tobias Bindemo
yesterday




Thanks Nigel Ren, this solved it for me!
– Tobias Bindemo
yesterday

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53238267%2fmagento-1-error-sqlstate42000-syntax-error-or-access-violation-1064%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53238267%2fmagento-1-error-sqlstate42000-syntax-error-or-access-violation-1064%23new-answer', 'question_page');

);

Post as a guest














































































這個網誌中的熱門文章

What does pagestruct do in Eviews?

Dutch intervention in Lombok and Karangasem

Channel Islands