Advertisement
You have an error in your SQL syntax;
Moderator: General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
-
- Joomla! Fledgling
- Posts: 4
- Joined: Thu Aug 29, 2013 9:01 pm
You have an error in your SQL syntax;
I got following error when I am trying to update joomla.
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 SQL=UPDATE `uh9nw_update_sites` SET `last_check_timestamp`='0',`location`='http://update.joomla.org/core/sts/list_sts.xml' WHERE
anyone knows the solution?
Thanks.
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 SQL=UPDATE `uh9nw_update_sites` SET `last_check_timestamp`='0',`location`='http://update.joomla.org/core/sts/list_sts.xml' WHERE
anyone knows the solution?
Thanks.
Advertisement
-
- Joomla! Virtuoso
- Posts: 4025
- Joined: Mon Nov 25, 2013 4:35 pm
- Location: Montreal, Canada
- Contact:
Re: You have an error in your SQL syntax;
It might be that an Akeeba bug has accidentally removed your "Update Sites". See: https://www.akeebabackup.com/home/news/ ... sites.html
http://www.itoctopus.com - Joomla consulting at its finest
https://twitter.com/itoctopus - Follow us on Twitter
https://twitter.com/itoctopus - Follow us on Twitter
- OldMoldy
- Joomla! Intern
- Posts: 52
- Joined: Sat Jan 30, 2010 11:19 pm
Re: You have an error in your SQL syntax;
I have the same error trying to update from Joomla 3.5.1 to Joomla 3.6.0 (not release candidate). I am using Akeeba backup core 5.1.2
- coaleb
- Joomla! Enthusiast
- Posts: 185
- Joined: Fri Mar 16, 2012 11:40 pm
- Location: California
- Contact:
Re: You have an error in your SQL syntax;
Unfortunately I don't have a solution for you, but I do have a small piece of advice: when including a MySQL statement in a post on this forum, you should never use your actual database prefix (e.g. uh9nw_), instead replace it with something like "#__" or "pre_". This prefix is unique to your site and helps secure it from database hacking attempts.
Also, you left out some potentially important information:
Best of luck!
Also, you left out some potentially important information:
- What happens after the "WHERE" in your MySQL statement?
- What version of Joomla are you ugrading from and to?
- DId the update succeed, or did this error stop it?
- What environment is your site installed on (PHP version, MySQL version, etc)?
Best of luck!
- OldMoldy
- Joomla! Intern
- Posts: 52
- Joined: Sat Jan 30, 2010 11:19 pm
Re: You have an error in your SQL syntax;
Current Joomla version 3.5.1 upgrading to 3.6.0
MySQL: Server version: 5.5.50-cll - MySQL Community Server (GPL), Protocol version: 10
Database client version: libmysql - 5.1.73
PHP Version 5.6.23
The SQL statement shown is:
SQL=UPDATE `#__update_sites` SET `last_check_timestamp`='0',`location`='http://update.joomla.org/core/list.xml' WHERE
The Joomla Update process stopped with this error.
When I set the server options to debug, the following added information is available:
*An error has occurred.**
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 SQL=UPDATE `hh9dx_update_sites` SET `last_check_timestamp`='0',`location`='http://update.joomla.org/core/list.xml' WHERE
Call stack
# Function Location
1 JApplicationCms->execute() /home/wavey/public_html/administrator/index.php:51
2 JApplicationAdministrator->doExecute() /home/wavey/public_html/libraries/cms/application/cms.php:257
3 JApplicationAdministrator->dispatch() /home/wavey/public_html/libraries/cms/application/administrator.php:152
4 JComponentHelper::renderComponent() /home/wavey/public_html/libraries/cms/application/administrator.php:98
5 JComponentHelper::executeComponent() /home/wavey/public_html/libraries/cms/component/helper.php:380
6 require_once() /home/wavey/public_html/libraries/cms/component/helper.php:405
7 JControllerLegacy->execute() /home/wavey/public_html/administrator/components/com_joomlaupdate/joomlaupdate.php:18
8 JoomlaupdateController->display() /home/wavey/public_html/libraries/legacy/controller/legacy.php:728
9 JoomlaupdateModelDefault->applyUpdateSite() /home/wavey/public_html/administrator/components/com_joomlaupdate/controller.php:49
10 JDatabaseDriver->updateObject() /home/wavey/public_html/administrator/components/com_joomlaupdate/models/default.php:89
11 JDatabaseDriverMysql->execute() /home/wavey/public_html/libraries/joomla/database/driver.php:2279
**Return to Control Panel**
MySQL: Server version: 5.5.50-cll - MySQL Community Server (GPL), Protocol version: 10
Database client version: libmysql - 5.1.73
PHP Version 5.6.23
The SQL statement shown is:
SQL=UPDATE `#__update_sites` SET `last_check_timestamp`='0',`location`='http://update.joomla.org/core/list.xml' WHERE
The Joomla Update process stopped with this error.
When I set the server options to debug, the following added information is available:
*An error has occurred.**
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 SQL=UPDATE `hh9dx_update_sites` SET `last_check_timestamp`='0',`location`='http://update.joomla.org/core/list.xml' WHERE
Call stack
# Function Location
1 JApplicationCms->execute() /home/wavey/public_html/administrator/index.php:51
2 JApplicationAdministrator->doExecute() /home/wavey/public_html/libraries/cms/application/cms.php:257
3 JApplicationAdministrator->dispatch() /home/wavey/public_html/libraries/cms/application/administrator.php:152
4 JComponentHelper::renderComponent() /home/wavey/public_html/libraries/cms/application/administrator.php:98
5 JComponentHelper::executeComponent() /home/wavey/public_html/libraries/cms/component/helper.php:380
6 require_once() /home/wavey/public_html/libraries/cms/component/helper.php:405
7 JControllerLegacy->execute() /home/wavey/public_html/administrator/components/com_joomlaupdate/joomlaupdate.php:18
8 JoomlaupdateController->display() /home/wavey/public_html/libraries/legacy/controller/legacy.php:728
9 JoomlaupdateModelDefault->applyUpdateSite() /home/wavey/public_html/administrator/components/com_joomlaupdate/controller.php:49
10 JDatabaseDriver->updateObject() /home/wavey/public_html/administrator/components/com_joomlaupdate/models/default.php:89
11 JDatabaseDriverMysql->execute() /home/wavey/public_html/libraries/joomla/database/driver.php:2279
**Return to Control Panel**
-
- Joomla! Virtuoso
- Posts: 4025
- Joined: Mon Nov 25, 2013 4:35 pm
- Location: Montreal, Canada
- Contact:
Re: You have an error in your SQL syntax;
Have you had the chance to check that Akeeba post I linked to in my first reply? I believe it solves the problem.
http://www.itoctopus.com - Joomla consulting at its finest
https://twitter.com/itoctopus - Follow us on Twitter
https://twitter.com/itoctopus - Follow us on Twitter
-
- Joomla! Exemplar
- Posts: 8808
- Joined: Sat Oct 01, 2011 7:06 pm
Re: You have an error in your SQL syntax;
What does Extensions->Update Sites report for Core?
Suggest to change location using phpMyAdmin.
Suggest to change location using phpMyAdmin.
Issue with migrating? Include logs/joomla_update.php in your report!
Blank screen? Verify pagesource for HTML code (javascript error)
Installation failing on populating database? Install with set_time_limit(0)
Document your customizations!
Blank screen? Verify pagesource for HTML code (javascript error)
Installation failing on populating database? Install with set_time_limit(0)
Document your customizations!
- OldMoldy
- Joomla! Intern
- Posts: 52
- Joined: Sat Jan 30, 2010 11:19 pm
Re: You have an error in your SQL syntax;
Thanks for the earlier post, itoctopus, that was the problem.
- coaleb
- Joomla! Enthusiast
- Posts: 185
- Joined: Fri Mar 16, 2012 11:40 pm
- Location: California
- Contact:
Re: You have an error in your SQL syntax;
If the MySQL statement ends with 'WHERE', and there are no WHERE conditions, that's probably why you were getting that syntax error. If the Akeeba bug wiped out your update sites, my guess would be that Joomla would usually put the ID of the Joomla Core update site after that WHERE statement, but since that ID didn't exist, it left it blank, which caused your syntax error.
Hope everyone got it sorted!
Hope everyone got it sorted!
-
- Joomla! Apprentice
- Posts: 47
- Joined: Sat Sep 26, 2015 8:25 pm
Re: You have an error in your SQL syntax;
I too am having the same issue and have been to the Akeeba site, read their directions, loaded their fix, uploaded to our site and repaired. No change. I opened our PHP MyAdmin, changed the timestamp and location URL for the update line and still getting the 1024 error. Any solutions?
- coaleb
- Joomla! Enthusiast
- Posts: 185
- Joined: Fri Mar 16, 2012 11:40 pm
- Location: California
- Contact:
Re: You have an error in your SQL syntax;
Error 1024 is very different than error 1064. 1064 is a parsing error (e.g. syntax error), whereas 1024 is a read file error. If you have a 1024 error the solution in this post will not work for you. Your best best might be to start a new post giving as much detail about your problem as possible. Be sure to include your version of Joomla, PHP, MySQL and any extensions you think might be related to the problem.
Advertisement