Elxis CMS Forum

Extensions => Modules => Topic started by: ks-net on October 26, 2008, 19:17:54

Title: newsflashes sql 1064 error
Post by: ks-net on October 26, 2008, 19:17:54
mysql Error [1064] : EXECUTE


URI: index.php
Message: 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 'link='index.php?option=com_content&task=section&sectionid=1' AND published='1' ' at line 2
SELECT id FROM elx_menu WHERE published='1' link='index.php?option=com_content&task=section&sectionid=1' AND published='1' AND ((language IS NULL) OR (language LIKE '%english%')) LIMIT 0,1

when linked from mod_sections
 ???
Title: Re: newsflashes sql 1064 error
Post by: datahell on October 26, 2008, 20:23:59
An "AND" is missing from the query.

SELECT id FROM elx_menu WHERE published='1' AND link='index.php?option=com_content&task=section&sectionid=1' AND published='1' AND ((language IS NULL) OR (language LIKE '%english%')) LIMIT 0,1
Title: Re: newsflashes sql 1064 error
Post by: datahell on October 26, 2008, 20:33:46
Can you tell me where this error is displayed exactly? In module newsflash?
Title: Re: newsflashes sql 1064 error
Post by: ks-net on October 26, 2008, 20:57:17
http://elxis.ks-net.gr/newsflashes/newsflash/

this link shows when ...
from http://elxis.ks-net.gr/
at sections(mod-sections published in left position) .. menu
hit newsflashes(link)...
then in content place appears frontpage-module(?) and below this link to newsflashes  which
when clicked the error appears.

and below each one of  these a note:
This category, and its parent section, are not linked to any menu and therefore are directly viewable on the Front-End of the website. Rather the Content Items contained inside this category are only used to feed items into the Newsflash module. See also, MODULES->SITE MODULES->NEWSFLASH
 ****
this is elxis  2008.1
 
also get an error when follow fqas link in sections menu(leftposition)

idont not care about them i dont really need them...i published them only to see
and i will leave there till you see  the errors...just to know.
Title: Re: newsflashes sql 1064 error
Post by: datahell on October 26, 2008, 21:22:12
I saw the error but I can not locate it. Needs more investigation.
Title: Re: newsflashes sql 1064 error
Post by: Farhad Sakhaei on December 30, 2008, 20:28:13
File : \includes\seopro\com_content.php
Line : 620

Replace :
Code: [Select]
                $query = "SELECT id FROM #__menu WHERE published='1'"
."\n link='index.php?option=com_content&task=".$task2."&sectionid=".intval($row['sectionid'])."'"

To:

Code: [Select]
                $query = "SELECT id FROM #__menu WHERE published='1'"
."\n AND link='index.php?option=com_content&task=".$task2."&sectionid=".intval($row['sectionid'])."'"
Title: Re: newsflashes sql 1064 error
Post by: datahell on December 31, 2008, 18:33:44
Thank you very much!
I updated Elxis SVN and Elxis 2008.1 release at elxis-downloads.com
Title: Re: newsflashes sql 1064 error
Post by: Farhad Sakhaei on December 31, 2008, 20:07:41
It is nothing beside your works John  ;)