Thanks for all replies. Here is what finally worked (if it might be
useful for you):
I overwrote the cakeError in app_model.php
// if this trigger - SILENT_MODEL_ERRORS is on, 'missing db table'
error wont produce and stop your stuff
function cakeError($error, $params)
{
Right now, If a table for a specific model is not found, CakePHP
execution stops with big Missing database table error - however
sometimes you may run into scenario where you need not following code
to run.. We ran into a similar scenario in a project which has like 30
models, out of which some
I don't know if cake has a way to list all the tables. Assuming it
doesn't you might try something like this:
//make array with tables
$sql = SHOW TABLES;
$result = mysql_query($sql);
while ($row = mysql_fetch_row($result)) {
Maybe you should re-think how your application works. If not all
tables are required, there should be some way to set that
application-specific. Maybe put something in bootstrap?
On Sat, Aug 8, 2009 at 3:09 PM, Abhimanyu Grovergigapromot...@gmail.com wrote:
Right now, If a table for a specific
why not just add some check while loading your models to see if they
exist
if(ClassRegistry::init($modelName)){
}
as an example (im sure there are better methods, check the api)
On Aug 8, 3:09 pm, Abhimanyu Grover gigapromot...@gmail.com wrote:
Right now, If a table for a specific model is