Try this to get all the tables. Then loop through the tables and perform an SQL query. This method is quite expensive, so you might want to set up a system to save tables that have been processed and pause process for a later cron job.
$dbTables = OW::getDbo()->query("USE `". OW_DB_NAME ."`
SELECT name FROM sys.tables
");
$dbTables = OW::getDbo()->queryForList("SELECT TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_TYPE = 'BASE TABLE' AND TABLE_SCHEMA='". OW_DB_NAME ."'
");
foreach( $dbTables as $table )
{
//perform query on table
}
$dbTables = OW::getDbo()->queryForList("SHOW TABLE STATUS FROM`". OW_DB_NAME ."`
WHERE comment LIKE '%crash%';
");
You can as well alter the above example to look like this:
$dbTables = OW::getDbo()->queryForList("SELECT TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_TYPE = 'BASE TABLE' AND TABLE_SCHEMA='". OW_DB_NAME ."' AND TABLE_COMMENT LIKE '%crash%'
");
In both cases, you will get an empty array if no table has crashed.