HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Database Manipulation
Farid_A
New
I have a few questions about database manipulation in Vanilla forums. I am using version 3.3. How do you update a record in a database in vanilla forums? I tried just using the regular algorithm used, but it does not work.
0
Comments
Phpmyadmin
I use MySQL Workbench
What is the "regular algorithm"? If you say what you have done right now, it would be easier to give advice. From within a plugin you would either use the model or a model and the methods update or setField.
or
By "regular algorithm", I mean the MySQL one. Here is a link to the algorithm I used: https://www.w3schools.com/php/php_mysql_update.asp
I used the mysqli object oriented version. How do you use the examples you gave me? Where do you insert those codes? Is there any other codes that needs to go with them?
Thanks!
As I've said "from within a plugin": https://docs.vanillaforums.com/developer/addons/addon-quickstart/
If you want to extend Vanillas functionality, the cleanest approach is to write a plugin. If you have set up a basic plugin, you can put the code above e.g. in a method "
public function pluginController_dbtest_create()
" so that it will be executed when you visit yourforum.com/plugin/dbtestThanks for the help R_I. I will give it a try.