I'm trying to put together a basic co-ordination app for my workplace, I have secured unique logins for each staff member.Part of the app is to have a display (using Ajax to keep up to date) showing who is available or unavailable for the next case load.I have encorporated it into the primary page and it executes upon log in & on log out instead.Data storing in to database enables us to keep the information safe and secure, but what if we wish to update it. For this you must have a database in My SQL with the information stored in it.Simply put; I can get the database to update using As I said, above, if the value for the WHERE section is a fixed value, such as a particular users username - it works.However, once changed to the session variable, it does not. UPDATE: Ok so after following the below suggestions This works fine to populate the various user names or what ever it is set to echo from the session, but when I try to use it as a variable for writing to the database/table, it then falls over. Issue appears to have been with my SESSION carry over to the php script that I have posted, being called by my primary page.
First of all, we connect to the database and select the appropriate record.
(The tutorials will work with any version of PHP and covers any differences you might encounter).
The author has also added updated installation instructions for Mac OS X Mountain Lion and Windows 8.
The following code block has a generic SQL syntax of the UPDATE command to modify the data in the My SQL table − The WHERE clause is very useful when you want to update the selected rows in a table.
This will use the SQL UPDATE command with the WHERE clause to update the selected data in the My SQL table tutorials_tbl.
For updated training, check out Start your free month on Linked In Learning, which now features 100% of courses.