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)) {
$tables[] = $row[0];
}
//put tables in the cake format for models
foreach ($tables as &$table) {
$table = Inflector::classify($table);
}
//intersect with your models array
$activeModels = array_intersect($tables, $models);
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---