Quote:
Originally Posted by Come2Daddy
is it a must to use datamanger in inserting data into database via a form embedded in a powered by vbulletin page??? or we can just do procedurally ?
|
You can do it procedurally if you feel more comfortable doing it that way. It's really up to you as the coder. If a datamanager already exists however (for instance, in the case of users, posts, forums, etc...) then i would suggest ALWAYS using the datamanager supplied by vbulletin. The reason I suggest this, is because often the datamanager class will update other tables which the record in the primary table interacts with.
For instance: Say you want to write a query to create a reply by a specific user to a certain thread automatically. This could easily be done with a query, however you must also remember to do a slew of other things such as update the post count of the user making the reply, update the user's last reply dateline field, etc... The datamanager always handles
these things behind the scenes which you don't have to worry about - otherwise if you don't do all these things your forums can easily get out of whack. When creating a datamanager for yourself, the key is to code these issues into it to avoide complications later on.