Looping through columns and conditionally updating their values with MySQL and PHP?

If samaccountname is a unique key, you can insert a new record or update an existing one like this.

You cannot loop through a PHP array using MySQL. You can create a very sophisticated query, via looping thourgh arrays in PHP, and then execute that query, or you can get the whole db table to an array, then loop through that array, make necessary changes to it and then loop it again and update the changed parts of the table.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions