Hi All,
Wappler: 6.3.3 stable
Win 11
MariaDB
I’m having issues with a NOT IN statement not behaving as it should. I have 16 example records q0 of them have courses in a table for next month and 6 dont. I need to find the IDs of the 6 that dont ahve the courses listed.
I have an array list, I have set a test value ‘FinalUIDList’ below it:
The above outputs the following:
TotalUIDs
11081,11095,12233,6040,7995,9172,9017,7074,11085,12245
FinalUIDList
11081,11095,12233,6040,7995,9172,9017,7074,11085,12245
The above array pulls out a list of 10 UIDs that I need to use to filter a MySQL query:
SELECT UID,Company,CompEmail,ContactName FROM mydb.ropecomp
WHERE UID NOT IN (:P1)
AND Trainer = 'Yes'
AND AccountLevel >0
When I hard code the array (10 records) into the query it works as it should, it shows the 6 records that are not in the array above:
SELECT UID,Company,CompEmail,ContactName FROM mydb.ropecomp
WHERE UID NOT IN (11081,11095,12233,6040,7995,9172,9017,7074,11085,12245)
AND Trainer = 'Yes'
AND AccountLevel >0
I’ve tried all variations on the above but I still cant get the NOT IN statement to return the correct records, can anyone out there lend a hand please?