General developer forum

Check if external database exists $DB->get_records_sql_menu

Re: Check if external database exists $DB->get_records_sql_menu

I've decided to add a Moodle Tracker recommendation. I just think it makes sense to be able to check whether an external database tables exists before performing an action so that I can have control over the error output.

In my situation, because my plugin is part of an activity, a database error knocks out the whole activity. While this isn't likely to be a problem, I prefer to have a fallback.



Average of ratings: -