Skip to main content

Best way to store data in root SQL database using livephp

Comments

2 comments

  • cPanelMichael
    Hello :) Could you elaborate a little more on the nature of the plugin? For instance, are you integrating any cPanel functions? Thank you.
    0
  • KostonConsulting
    When you install the plugin (you need to build your own installer), you can create a database as root and then you can access it through PHP's mysqli functions ([url=http://php.net/manual/en/book.mysqli.php]PHP: Mysqli - Manual). However, if you just need to store data for an individual user, using MySQL is probably not the way to go. You should use cPanel's NVData (non-volatile data store) functions to store individual user data: [url=http://docs.cpanel.net/twiki/bin/view/ApiDocs/Api2/ApiNVData]NVData Module Documentation The main advantage of NVData over MySQL is that the data will be stored in the user's $HOME directory which means if their account is transferred to a different cPanel server, the data will still be available.
    0

Please sign in to leave a comment.