what i need is to be albe to select all the fields information from a table, where the name of the field from another table called “field_(and a number)”
i’ve tryed things like that but it didn’t work…
SELECT *
FROM `fieldList`
WHERE ID = "(SUBSTRING(SHOW FIELDS,5) FROM formList_5 LIKE 'field_%')"
and
SELECT *
FROM `fieldList`
WHERE ID = "SUBSTRING((SHOW FIELDS FROM formList_5 LIKE 'field_%'),5)"
but it didn’t work.
This is what you need:
But, for sanity’s sake, review your DB design if you can.