MyBB Community Forums
How to add a new field in a database and display it? - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: 1.8 Support (https://community.mybb.com/forum-175.html)
+--- Forum: General Support (https://community.mybb.com/forum-176.html)
+--- Thread: How to add a new field in a database and display it? (/thread-195369.html)



How to add a new field in a database and display it? - Andre R. - 2016-07-07

For example, if you had a stock count, how would you:

  • Add an additional database field somewhere for the stock levels of different products
  • Have a field in the Admin CP to set the initial stock level
  • Display that stock level from the DB somewhere in the template {$stocklevel1}
  • Have that stock level reduce by one each time a button is clicked
This would be very helpful!