Codeigniter 1.7.2 with MS Sql Server and Oracle

#1
[eluser]fatman[/eluser]
Hi,

I'm have a screen where the user can enter a query and choose a DB type and then run a test on the query.

I'm supposed to support MySql, Oracle and Sql Server.

naturally ,MySql is a piece of cake , but I couldn't find a good tutorial on configuring Codeigniter with Oracle/Sql Server, can anyone refer me to such tutorial/s?

Thanks.

#2
[eluser]shane_[/eluser]
Are you running PHP on Linux? I don't have a specific tutorial or the details right off. But I connect to SQL Server using ODBC on Linux. I use FreeTDS and unixODBC. I had to use an older version of FreeTDS (not sure which right now). I don't have any experience with Oracle.

#3
[eluser]fatman[/eluser]
Actually I need to be able to run it on both Linux and Windows.

Is there a difference when running on Linux or windows in terms of code, or I can write the same code and just change the driver?

I'd really appreciate a pointer here, I'm quite lost, am I the only crazy who tries to run PHP on Oracle/Sql Server?

#4
[eluser]shane_[/eluser]
Yeah your code should be the same for the most part. The main thing is getting your server configured to talk to the database servers. I don't have any experience with PHP on Windows but there is a SqlSrv PHP extension which is a library developed by Microsoft for PHP 5.3+. Linux is a little tricky. There is a MSSQL PHP extension for Linux but I've never used it. SQL Server uses a protocol called tabular data stream for communication. FreeTDS is a library that implements this protocol on Linux. So whether you use the MSSQL extension or ODBC on Linux you'll need FreeTDS. As far as CodeIgniter drivers I've only used mysqli and odbc. I've used odbc with both SQL Server and DB2.

#5
[eluser]fatman[/eluser]
Thank you very much for your help Smile

Any one else cares to share his/her knowledge/Give pointers to a tutorial?

EDIT:

After reading the active records user guide again, it is mentioned there that it is DB agnostic, is it really the case?

Does CI support All major DB OOB?


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.