If I have a .php file with some Oracle code previously accessing a Oracle DB, but have setup a MySQL DB and want to edit the existing .php file to be compatible with the MySQL DB, how would I go about doing this? Do I have to manually go through each line and search for the equivalent MySQL statement, and if so, is there a library I can access that gives me the Oracle to MySQL equivalent command?
There is this website with a good compilation of tips and tools to help you out on this task: http://www.sqlines.com/oracle-to-mysql
Currently I am working with PHP and need to know, if it is possible to connect PHP and Derby database. If yes, anyone can tell me about how to do it? Thanks in advance.
NB: I have read an article about IBM tool, which can be used for connecting both of them. But currently the tools is not downloadable.
i've looked into the tidesdk and found no way to query a local or external mysql database.
is there a way to connect to mysql and query a database/table, maybe via php?
thx for help
Currently there is no native way of accessing MySQL through TideSDK. You are welcome to help us create the native module for TideSDK to access MySQL.
I want to read the data from .CDB files which seems to be a SQLite 3 database files. I want to read data and handle it using PHP. Can you please suggest me a solution for that?
I tried ADOdb for PHP where the CDB format is not supporting in SQLite driver.
Thanks in advance.
Currently we have a hybrid ASP/PHP setup connecting to a SQL Server 2005 database. But all the query work is done on the client side, I'd like to move some of this to PHP.
What driver and/or connection string is needed to connect to Sql Svr and what is the syntax to use in PHP?
Update: OK so I was definitely trying to avoid using anything to do with copying DLLs etc. I'll look into the SQL2K5PHP driver (thanks Vincent). #jcarrascal for the sake of clarity, by "client side" I mean our application is an internal web app that runs as an HTA, with all queries done via javascript calls to an ASP which actually submits the DB request.
You have two options:
1) php_mssql extension : If you'd like something that has the same API mysql and mysqli has, then use the php_mssql extension. But there is a catch, the bundled ntwdblib.dll file with PHP is not working. You have to find this file from a SQL Server 2000 installation or you can find it on the Internet. This API is supposedly not very reliable but I have been using it without problem for about one year.
http://ca.php.net/mssql
2) Microsoft SQL Server 2005 PHP Driver : If you'd like something more modern but which does not have the same API and is missing some important functions (mssql_num_rows). The big plus is that it is supported by Microsoft and is likely to work with a future version.
http://msdn.microsoft.com/en-us/data/cc299381.aspx
Just use the mssql_connect() function like this:
$conn = mssql_connect('localhost', 'sa' , '123456')
or die('Can\'t connect.');
mssql_select_db('database', $conn)
or die('Can\'t select the database');
Functions relating to SQL Server are defined in the PHP manual for the MSSQL driver.
One question though, "all the query work is done on the client side" WTF? :D
PHP provides an extension for accessing Microsoft SQL Server databases. To use the SQL Server extension, all that is required is to activate the extension in the PHP configuration file.
Details on the MSDN page