I need to pull data from a separate system into a plugin I've written. It works fantastically well. I'd like to put a fail safe into my plugin so that if for some reason the table in my external database is not present, then the data is not loaded. I would add a warning instead.
Currently, I get the message:
Error reading from database
A simple solution would be for me to import the table into the Moodle database where I can use commands to check for it's presence. However, I would prefer an IF EXISTS, If ! == NULL or other code based solution to make this work.
Is this possible?