On the database I have 2 values as above. now every time it completes I will -1 the value and update it to the database, when it completes it will stop the script, but in multithreading for example I have 2 rows it seems to work properly but when running 3 threads it doesn't work properly
@LongDong foreach works with lists, but @UserTrue suggested the option of how to take account strings from resources multiple times in 1 thread.
resource is not a list.