Hello,

Not sure if this has been discussed before, but I couldn't find it. As
much as I hate to do it, I think I may need to use my first custom
query out of this entire website (either that or use a recursive
search, which is running thousands of queries instead of just 1).

My biggest issue with a custom query is that for my local development
machine, I use MySQL and the production server uses MS SQL (not my
choice). Obviously a custom query won't work when copying code between
these two, so I wanted to try coding something like:

if ($database_driver == 'mssql') {
    $query = 'select....';
}
elseif ($database_driver == 'mysql') {
    $query = 'select....';
}

I'm open to suggestions if there's a way to avoid a custom query here,
but if not, is there at least a good way I can determine which DB
driver is being used so I can do something similar to the above?

Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to