215 Posts
7 years ago

Wondering if someone can help me with a SQL query ? ...

I have this so far ... which works. It allows a user to convert one SKU for another SKU (in another system)

SELECT wci_sku, fti_sku, description
FROM #__cck_free_form_xref
WHERE [MATCH]wci_sku||$uri->getValue('x_wci_sku')[/MATCH]
AND [MATCH]fti_sku||$uri->getValue('x_fti_sku')[/MATCH]

See sample here:


What I need to do is grab another field "qty_onhand" from another table, call it "Qty-onHand-table".

I'm a bit confused on the MATCH portion as I am allowing the user to enter one OR the other (WCI or FTI skus) to get the conversion PLUS the Qty on Hand from the other table. This other tables shares both the wci_sku and fti_sku fields

Thx in advance for your time.

Get a Book for SEBLOD