2016-09-19, 10:48 AM
2016-09-19, 09:19 PM
This is really easy.
if($db->field_exists($field, $table))
{
// do something;
}
else
{
// do something else;
}
2016-09-19, 10:54 PM
(2016-09-19, 09:19 PM)dragonexpert Wrote: [ -> ]This is really easy.
if($db->field_exists($field, $table)) { // do something; } else { // do something else; }
Where would I insert it into is more of my question : Thank you so much dragonexpert!!!!
2016-09-20, 03:48 AM
Plugins are suppose to have database changes handled in the _install function for adding fields and removing fields and tables in the _uninstall function. You globalize the variable $db to give you access to the database class and its methods.