In Joomla 2.5, how can I do a form field type "SQL" with the condition "WHERE" in the SQL query?
Example:
<field name="catid" type="sql" query="SELECT id, title FROM #__table WHERE {condition}" />
There isn't anything about this in the joomla docs. I've found this link but it doesn't refer anything of using a WHERE condition in the SQL query ( http://docs.joomla.org/SQL_form_field_type).
Can someone please tell me if this is possible or not to do in Joomla?
I have a table with products and a table with shops associated to brands. If I edit one shop I would like to show a combobox with all the products from the brand of the shop. Is that possible? SELECT * FROM #__products WHERE brand = {the brand id associated to the shop I selected for edit} Is this possible?
I was able to do this with a custom form field =)
http://docs.joomla.org/Creating_a_custom_form_field_type
Thank you RHR for your answer !