Page 1 of 1
database for plugin
Posted: Fri Jan 21, 2005 6:34 pm
by oxygenws
how can i use any kind of database (database/file) for my plugin??
should/could i use add($name, $value) as my DB?!!
best regards, omid
Re: database for plugin
Posted: Sat Jan 22, 2005 11:58 am
by garvinhicking
Uhm, I'm not sure if I understood you properly.
Look at the serendipity_plugin_shoutbox plugin, that is a small and easy example for a plugin creating its own database entry.
If you just want to store values, use:
Code: Select all
$this->set_config('your_config_variable', 'your value');
and later you can fetch it via:
Code: Select all
$this->get_config('your_config_variable');
But this is always stored inside DB table serendipity_config then.
Regards,
Garvin
Posted: Sat Jan 22, 2005 12:18 pm
by oxygenws
Thanks Garvin