We will be undergoing scheduled maintenance on May 20th, 2013 at 02:00 GMT.
Visitors to VTC.com will be able to view all introductory videos for each training course.
Free Trial Members will gain access to first three chapters for each training course.
Full Access Members have full access to VTC.com�s entire library of video tutorials.
We are now able to display our tasks on the ToDo page of our web application. However there is a slight problem. Everyone sees the same list of tasks. If I login as Bob, I see these tasks. If I login as Paul, I see the same tasks. Ideally we would want to only see the tasks assigned to the particular user. To do that we need to make a slight change to the database so that we can save the user name along with the task. In SQLLite Studio, open the ToDo database. In the SQL Editor, we will alter the table to add a new column. We can now see our new column on the table. Let's add some user names to the column. Now back in the project we need to tell it to only load the tasks for the currently logged in user. We save the user in the user name property of the session, so we can use that when we are loading the tasks. Tasks are loaded by the task class. So here we need to add the user name. Now we can run the project. Here we only see four tasks now. If we run it again and login as Bob, we should only see the two tasks that are assigned to Bob. The last thing we need to do, is when we are saving, we need to also set the user name. Now when a new row is created, or an existing row updated, the user name field will be filled in with whoever the login user is.
| Course: | Real Studio |
| Author: | Paul Lefebvre |
| SKU: | 34190 |
| ISBN: | 1-936334-77-1 |
| Release Date: | 2011-02-02 |
| Duration: | 7 hrs / 87 lessons |
| Work Files: |
Yes |
| Captions: | No |
| Compatibility: |
Vista/XP/2000, OS X, Linux QuickTime 7, Flash 8 |