Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
db support question
  • Hi, Before we think about using Fuel, our application needs to support MSSQL and Oracle databases. Can Fuel do this? If so, can someone provide a sample db.php for both. Cheers,
    Trav.
  • Fuel uses Kohana's DB class so I'd assume that looking here would help you. Having looked at the drivers available (see here), it appears to support mysqli, mysql and PDO anyway hope this helps
  • Hi Ben, Yes i noticed Fuel is using kohana DB libs, and i have searched for kohana and MSSQL, but I can't find in there docs or the web if mssql or oracle is supported. I have never used PDO, so if someone has any experience with Fuel,PDO,mssql and would like to help that would be great. Im starting to like Fuel, but I may have to find another framework that has better DB support if Fuel fails here. :( -t
  • Here's a DB config example for the PDO driver with mySQL:
    'dev' => array(
      'type'   => 'pdo',
      'connection' => array(
       'dsn'        => 'mysql:host=localhost;dbname=test',
       'username'   => 'username',
       'password'   => 'password',
       'persistent' => false,
      ),
      'table_prefix' => '',
      'charset'      => 'utf8',
      'caching'      => false,
      'profiling'    => false,
     ),
    

    From a quick look at the php.net docs I think you need to use the ODBC PDO driver and create a DSN for it: PDO ODBC DSN
  • successfully connected to mssql using:
    'dev' => array(
    'type' => 'pdo',
    'connection' =>array(
    'dsn' => 'dblib:host=127.0.0.1:1433;dbname=demo',
    'username' => 'user',
    'password' => 'password',
    'persistent' => false,
    ),
    'table_prefix' => '',
    'charset' => '',
    'caching' => false,
    'profiling' => false,
    ),

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion