I need to update the completed fields for users in table5. There are already records for the users in table5 just no entry for completed.
The logic needs to work as follows. If there is a '2' for a module then it means that module is complete. And a '1' is added to completed. A '0' or a '1' for any modules means nothing, they do not get 1 added to completed. So in the case of user1, that person has completed of 3 (1 + 1 + 1). HOWEVER, there is a key point. A module is only seen as complete if the preceeding module has a 2 in it. So in the case of user 2, that person's completed is 0 because module 1 has a zero. It is irrelevant that they got a 2 in module 2 and module 3. Could somebody help me out with an update sql statement for completed in table 5?
Just so I show the logic, below is what the completed would be for all 10 users. Thanks.
Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.
Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
This article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing.
Set up your basic HTML file. Open your form tag and set the method and action attributes.:
Set up your first few inputs one for the name and …