Mysql query returns 1 row when using value from an element vs when manually set the value it pulls all matching rows

hi! first post here so forgive me :slight_smile:

I have a query to get a list of data for a specific organisation in my DB. That is successful and returns data. I then use a field from that to query another table to find all matching rows and return the org_id.

This query should return 4 rows and it just returns 1.

select org_id from organisations_custom_fields where field_value={{}};

This query returns all 4 if i replace the value with the actual id (clearly not it below)

select org_id from organisations_custom_fields where field_value='0019000000xixxxxxxx';

any ideas why it would not be returning the multiple rows??

Can you make a screenshot of the result of the query and the query itself?

Are you using the query library or query in the app editor?

Hi bud - i think i have made a rooky mistake in some query cache and need to check them all - its working this morning... and i am stumped on why but clearly its something i have forgotten ihave set that caused this. Apologies!!!! Nick

Caching. That would explain it. :sweat_smile: I hadn’t thought about that yet

1 Like