I have a Python script that uploads a Database file to my website every 5 minutes. My website lets the user query the Database using PHP.
If a user tries to run a query while the database is being uploaded, they will get an error message
PHP Warning: SQLite3::prepare(): Unable to prepare statement: 11, database disk image is malformed in XXX on line 127
where line 127 is just the prepare function
$result = $db->prepare("SELECT * FROM table WHERE page_url_match = :pageurlmatch");
Is there a way to test for this and retry the users request once the database is done uploading?
Aucun commentaire:
Enregistrer un commentaire