Hi,
I'm new in Fabrik and need your advise about how I can use placeholders in WHERE conditions of databasejoin element.
I have a List "List_manager" where element "Status" is databesejoin element to another List "Statuses".
List "Statuses" consists of the following elements
id Status login_name Status_new
1 Sent m22, manager Sent
2 In Process m22, manager Sent
3 Rejected manager Sent
Suppose that element "Status" in a list "List_manager" have a "Sent" value
In the WHERE I want to filter some number of records from a Status list to be displayed as possible drop-down values
where status,status_new = {List_manager___status} statuses.login_name LIKE '%{$my->username}%'
but then I got a SQL error message
064 - 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 'and statuses.login_name LIKE '%m22%' ORDER BY text ASC' at line 3 SQL=SELECT DISTINCT(`statuses`.`id`) AS value, `status` AS text FROM `statuses` AS `statuses` WHERE statuses.status_new = and statuses.login_name LIKE '%m22%' ORDER BY text ASC
At the same time I expected that SQL statement generated by Fabrik should looks like
SQL=SELECT DISTINCT(`statuses`.`id`) AS value, `status` AS text FROM `statuses` AS `statuses` WHERE statuses.status_new = 'Sent' and statuses.login_name LIKE '%m22%' ORDER BY text ASC
but as you can see I got a empty value for a {List_manager___status} placeholder,
What is a correct way ( if any) to use placeholders in the WHERE condition in databesejoin element?
Might be it is a stupid question, but I spend hours to find a solution...
I'm new in Fabrik and need your advise about how I can use placeholders in WHERE conditions of databasejoin element.
I have a List "List_manager" where element "Status" is databesejoin element to another List "Statuses".
List "Statuses" consists of the following elements
id Status login_name Status_new
1 Sent m22, manager Sent
2 In Process m22, manager Sent
3 Rejected manager Sent
Suppose that element "Status" in a list "List_manager" have a "Sent" value
In the WHERE I want to filter some number of records from a Status list to be displayed as possible drop-down values
where status,status_new = {List_manager___status} statuses.login_name LIKE '%{$my->username}%'
but then I got a SQL error message
064 - 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 'and statuses.login_name LIKE '%m22%' ORDER BY text ASC' at line 3 SQL=SELECT DISTINCT(`statuses`.`id`) AS value, `status` AS text FROM `statuses` AS `statuses` WHERE statuses.status_new = and statuses.login_name LIKE '%m22%' ORDER BY text ASC
At the same time I expected that SQL statement generated by Fabrik should looks like
SQL=SELECT DISTINCT(`statuses`.`id`) AS value, `status` AS text FROM `statuses` AS `statuses` WHERE statuses.status_new = 'Sent' and statuses.login_name LIKE '%m22%' ORDER BY text ASC
but as you can see I got a empty value for a {List_manager___status} placeholder,
What is a correct way ( if any) to use placeholders in the WHERE condition in databesejoin element?
Might be it is a stupid question, but I spend hours to find a solution...