1
I have most of the functions located in object.php figured out. I've been playing around with trying to update a single row in my database through extending the XoopsPersitableObjectHandler. I have been able to update one field at a time, but was wondering is there a function I'm missing that would update all fields in a row, or am I reading how to use the updateall function?
Example of how I insert a new row
$article_handler = xoops_getModuleHandler('NewsArticles', 'MyNews');
//Build object
$article->art_cat_id = $_POST['art_cat_id'];
$article->art_title = $_POST['art_title'];
$article->art_text = $_POST['art_text'];
$article->art_submitter = $uid;
$article->art_submit_date = $_POST['art_submit_date'];
//Create data and insert.
$article_data = $article_handler->create();
$article_data->setVars($article);
$article_handler->createArticles($article_data);
// Part of my class that extends XoopsPersitableObjectHandler
/*
* create
*/
function createArticles($data)
{
$this->insert($data);
}
Is there a function that I can use with XoopsPersitableObjectHandler that does the same thing but updates a rows fields instead? So that I can place all my data from a form into an object and then push that object through my class system?