You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Loop through report and update account based on row data CPHP

Accepted answer
21
Views
2
Comments

Summary:

I am trying to automate locking staff accounts if they have been inactive for 30 days. This is something we run manually from a report exception each morning.

I've been trying to write some PHP to do this but I cant seem to figure out how to loop through each line of the report after its been fetched. I want to save the account ID and Days to variables, and then action them via an account fetch.

The commented out code is what I will use within the loop when I can figure it out. I know there are multiple ways to do this, including a foreach, but I'm not sure how PHP handles and stores arrays to loop through each row properly.

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!