Skip to content
Advertisement

Pulling Queries from Database Clears Results on Error vs. Stopping

We have a script that pulls queries from a database every couple of minutes. Those results are then shown in a table on a webpage. It works great, until that database responds with an error code (for whatever reason that may be) and instead of stopping it clears all the data. We don’t want this data being cleared. It just needs to stop trying to pull if it gets an error message and wait until the next pull. Any idea how we can prevent this clearing all content?

Connection to Database:

Code to display the results on the page:

Thank you in advance!

Advertisement

Answer

You might try changing your query to:

I don’t know if that will filter out your error message

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement