If you get your database connection details from the ConnectionManager you will at least be able to deduce your table prefix and integrate this into your querries.
-----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Fabio Kreusch Sent: Thursday, January 22, 2009 10:48 AM To: CakePHP Subject: Custom queries test Hello all! I'm thinking about on how to test custom queries in a model. Suppose I have something like this in a model: function doSomethingWithCustomQuery() { return $this->query('SELECT * FROM table'); } How can I test this using the fixtures and all? My main problem is how to detect the test environment so I can, for exemple, attach 'test_suite' to the table name, so the query will run on the test table. How can I do this? Internal Virus Database is out of date. Checked by AVG - http://www.avg.com Version: 8.0.176 / Virus Database: 270.10.8/1899 - Release Date: 1/17/2009 5:50 PM --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
