Quote:
Originally Posted by stryka
THis was a great tutorial... and I am able to use it for inserting records... But what about the UDPATE function?
Can you spell out how the UPDATE function works when using a Custom DataManager?
I am not sure how it works and how it gets the current record...
I'd like to also know when DM's should be used.... vs a simple INSERT statement within the file...
thanx
|
I believe you would use
$var->condition = "exampleid = 1";
PHP Code:
$example =& vB_DataManager_Example($vbulletin, ERRTYPE_ARRAY);
$example->condition = "exampleid = 1";
$example->set('userid', 1);
$example->set('username', 'harmor19');
$example->set('exampletext', 'Testing');
$example->save();
If I'm right it should update the table where exampleid is equal to "1".