Well, I tried it with a simple table and nothing got inserted. So there must be something more to this.
|
Check the $errors array to see if there where any problems.
Alternativly, PM me your datamanager PHP file, and the PHP your using to test it, and I'll take a look. The code above will (well, works here) work without changes though :) Thanks, Alan. |
Alan,
Shouldn't PHP Code:
PHP Code:
|
That'll teach me to base my example of the User DM :D
Edited first post |
So with the help of this tuitorial, I could create a data manager for creating User Notes about members, correct?
|
Correct.
Thanks, Alan. |
sweet, going to give this a try shortly. thanks!
|
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 |
Quote:
I believe you would use $var->condition = "exampleid = 1"; PHP Code:
|
So i have written two custom datamanagers, one saves/updates the main info, while I use the other (within a loop) to update the related records.
I have to call the database from within each of the DMs to update some other tables with related info as well, and while looking at vbulletin's existing datamanagers, i see more than one method of calling the database, for example: Within class_dm_threadpost some calls to thge database are made like this: Code:
$this->dbobject->query_write Code:
$this->registry->db->query_write |
All times are GMT. The time now is 05:04 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|