Chapter 3: Read and Update
Next, we will deal with how we will read the data from the database, for our defined types, for inline editing, and how to update that data as well.
You may be asking the question, have we already not got the data so why do we need to read it from the data again?
Well, the answer is Yes and No.
Also we may not even have all the data, if we are in a category blog view, when we are trying to edit a blog item.
So taking all of the above into account, in summary, we have to read the data ourselves from the database, and retrieve the data, exactly, as it is stored in the database, without any data transformation, so that the end user can edit it. Once the data has been edited, we then need to send the edited data, back to Joomla to be saved.
It doesn’t finish there; we have to send back the saved data to the user and update the data, transform and render it as it was before the user edited it.