Hello Fellow Sebloders,
Thx for reading my topic. I have been using the Search Query product to search single fields in a native Joomla dB table, BUT want to expand the query by searching 2 or more fields an e-commerce database (non-Joomla) table/s.
E.g. let's say I need to search for a heater, which has a minimum and maximum output.
I want to allow the visitor to search for minimum output >= 100 and a maximum =< 220.
Since these fields exist in a non-Joomla dB. I need:
#1 -- use a non-Joomla connection to the database
#2 -- construct a SQL query for 2 or more fields. Wondering if there is a way to do this so fields may be added to the SQL query string ONLY IF the user as actually entered data into the field ?
Is this best product "Search Query" to do this with?
Here is SELECT SQL query I have used to match one field when the user has entered data into one field.
SELECT a.int_sku, a.wci_sku, b.fti_sku, b.description, a.qty_onhand, a.qty_alloc
FROM #__cck_free_form_xref_qty AS a
JOIN #__cck_free_form_xref AS b
ON a.fti_sku = b.fti_sku
WHERE [MATCH]a.fti_sku||$uri->getValue('x_fti_sku')[/MATCH]
Thx much