Keyword

yet another 1064 You have an error in your SQL

  • Joe Allen
  • Joe Allen's Avatar Topic Author
  • Offline
  • New Member
More
10 years 10 months ago #121559 by Joe Allen
Hi,

If anyone can shed some light on why this is happening every time I try and add a new article. Using J3.2.

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 `c9vql_finder_taxonomy_map` SET `link_id`='6',`node_id`='3' WHERE

Thanks,

Joe

Please Log in or Create an account to join the conversation.

  • Yiota
  • Yiota's Avatar
  • Visitor
10 years 10 months ago #121560 by Yiota
Do you use a third party K2 plugin?

Please Log in or Create an account to join the conversation.

More
10 years 8 months ago #121561 by Blu Dove Designs
Replied by Blu Dove Designs on topic Re: yet another 1064 You have an error in your SQL
I'm having the same issue and getting the error after upgrading. I have J3.2 and latest version of K2. I am using the K2 Dynamap however it was upgraded to work with J3.x

I'm also having a lot of other error messages and problems like:
looking at MySQL and I see a lot of queries that are taking a long time (this one took 7 seconds) similar to:

SELECT c.*, i.catid, i.title, i.alias, category.alias as catalias, category.name as categoryname
FROM j3_k2_comments as c
LEFT JOIN j3_k2_items as i ON i.id=c.itemID
LEFT JOIN j3_k2_categories as category ON category.id=i.catid
WHERE i.published=1
AND ( i.publish_up = '0000-00-00 00:00:00' OR i.publish_up <= '2014-01-08 17:00:22' )
AND ( i.publish_down = '0000-00-00 00:00:00' OR i.publish_down >= '2014-01-08 17:00:22' )
AND i.trash=0 AND i.access IN(1,1) AND category.published=1 AND category.trash=0 AND category.access IN(1,1) AND c.published=1 AND i.catid IN(53) ORDER BY c.commentDate DESC LIMIT 0, 6

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 8 months ago #121562 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: yet another 1064 You have an error in your SQL
Please update to K2 2.6.8 DEV build -

Let me know if the issue persists. getk2.org/assets/get/

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
10 years 8 months ago #121563 by Blu Dove Designs
Replied by Blu Dove Designs on topic Re: yet another 1064 You have an error in your SQL
:(

The problem is still persisting after the update to the development version of K2. The same error I previously posted is occurring.

I also tried to create a new item and got the following error:
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=DELETE FROM j3_k2_tags_xref WHERE itemID={intval()}

I seriously need help to resolve these issues...

Please Log in or Create an account to join the conversation.

  • Yiota
  • Yiota's Avatar
  • Visitor
10 years 8 months ago #121564 by Yiota
Please try to Fix your database through the Extension Manager -> Database or repair it through your phpMyAdmin. Also try to Disable the K2 Dynamap and check again.

Please Log in or Create an account to join the conversation.

More
10 years 8 months ago #121565 by Blu Dove Designs
Replied by Blu Dove Designs on topic Re: yet another 1064 You have an error in your SQL
Still not working. I ran the database fix, tried it and got the 1064 error.
Then I disabled the dynamap and tried to make a new item and got the 1064 error


Got a message from my web host this morning who did some debugging.
So I disabled Gk4 module and I still get the 1064 error.

Additionally - here is what he said when he debugged:

I've debugged the code and found the invalid SQL query was being generated by line ~260 in ./modules/mod_news_pro_gk4/gk_classes/gk.source.k2.php. The offending query (pasted below) had an empty WHERE condition.

I've added this code to line 258 to put a '1' in the SQL query if the WHERE condition is empty:
if (empty($second_sql_where))
$second_sql_where = '1';

The site is now loading :)

The job now is finding out why $second_sql_where (generated on line 228) was empty in the first place

Offending query:

SELECT
content.id AS ID,
cats.name AS cat_name,
cats.alias AS cat_alias,
content.catid AS cat_id,
users.name AS author,
users.email AS author_email,
users.id AS author_id,
content_rating.rating_sum AS rating_sum,
content_rating.rating_count AS rating_count
FROM
j3_k2_items AS content
LEFT JOIN
j3_k2_categories AS cats
ON cats.id = content.catid
LEFT JOIN
j3_users AS users
ON users.id = content.created_by
LEFT JOIN j3_k2_tags_xref AS tx ON content.id = tx.itemID LEFT JOIN j3_k2_tags AS t ON t.id = tx.tagID
LEFT JOIN
j3_k2_rating AS content_rating
ON content.id = content_rating.itemID
WHERE

ORDER BY
content.created DESC

Is there any way I can PM someone and have my site fixed?? This is ridiculous that these problems are persisting and I have businesses depending on the software.

Thanks!

Please Log in or Create an account to join the conversation.

  • Yiota
  • Yiota's Avatar
  • Visitor
10 years 8 months ago #121566 by Yiota
Hello Lisa,

Glad you located your issue after all. As it turned out this had nothing to do with K2 but a third party extension from Gavick. You can PM them and ask for their support in the matter.

www.gavick.com/supportdesk/

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum