I use the database join plugin with additional sql in the field "Joins where and/or order by statement (SQL)". Here my add. sql:
This leads to the following sql created by fabrik, which is wrong:
The problem is that fabrik inserts a "WHERE" right at the beginning of the additional SQL. See "WHERE JOIN..."
Any hint how to solve this?
Thank you in advance.
P.S.
Fabrik - latest version 3.x from svn of 18/3/2013
DatabaseJoin element as of its xml: 3.0.7
Database Version 5.0.51a-24+lenny5
Database Collation utf8_general_ci
PHP Version 5.2.6-1+lenny16
Web Server Apache
WebServer to PHP Interface apache2handler
Joomla! Version Joomla! 2.5.9 Stable [ Ember ] 4-February-2013 14:00 GMT
Code:
JOIN wa_contenttype_to_category AS a
ON a.contenttype_id = 1
WHERE joomla_content.catid = a.category_id
This leads to the following sql created by fabrik, which is wrong:
Code:
SELECT DISTINCT(`joomla_content`.`id`) AS value, `title` AS text
FROM `joomla_content` AS `joomla_content`
WHERE JOIN wa_contenttype_to_category AS a
ON a.contenttype_id = 1 WHERE joomla_content.catid = a.category_id
ORDER BY text ASC
The problem is that fabrik inserts a "WHERE" right at the beginning of the additional SQL. See "WHERE JOIN..."
Any hint how to solve this?
Thank you in advance.
P.S.
Fabrik - latest version 3.x from svn of 18/3/2013
DatabaseJoin element as of its xml: 3.0.7
Database Version 5.0.51a-24+lenny5
Database Collation utf8_general_ci
PHP Version 5.2.6-1+lenny16
Web Server Apache
WebServer to PHP Interface apache2handler
Joomla! Version Joomla! 2.5.9 Stable [ Ember ] 4-February-2013 14:00 GMT